I ran the following to Install the latest Arduino IDE on my Raspberry Pi3. This should work all Pi models. This release enables you to run the Arduino Software (IDE) on many of the mini PC boards based on ARM6+ processors currently on the market, including Raspberry Pi
# Installing Arduino IDE
cd /usr/share/
sudo tar xf /home/pi/arduino-1.8.49-linuxarm.tar.xz
sudo chown root:root -R /usr/share/arduino-1.8.49/
# Adding desktop shortcut, menu item and file associations for Arduino IDE
# Each user needs to repeate this
cd
/usr/share/arduino-1.8.49/install.sh
There is a similar instruction in MagPi61 except they suggest installation in /opt