Smart Cities - Arduino IDE installation
Background
- The default Arduino IDE (Integrated Development Environment) installed on the Raspberry Pi is an older version.
- This lesson explains how to install the latest version of the Arduino IDE.
- The current version of Arduino IDE for the Raspberry Pi is 1.8.19
Online Resources
- https://www.raspberrypi-spy.co.uk/2020/12/install-arduino-ide-on-raspberry-pi/
- https://www.arduino.cc/en/software
- https://roboticsbackend.com/raspberry-pi-arduino-serial-communication/#Arduino_code
- https://youtu.be/jU_b8WBTUew
Upgrading the existing Raspbian Operating System
- Firstly, using the Terminal on the Raspberry Pi, updated the software library with the command sudo apt-get update.
- Upgrade the existing operating system and software with the command sudo apt-get full-upgrade -y
- The upgrade may take 10 to 20 minutes.
Download Arduino IDE
- We need to download the latest version of the Arduino IDE software compatible with the Raspberry Pi.
- You can go directly the Arduino Download site and download the Linux ARM 32 bit version.
- Alternatively, you can use the wget instruction.
Download the Arduino IDE Software
- Create a new folder for the Arduino IDE software.
- In the Terminal enter the following commands.
- mkdir Applications
- cd Applications
- When in the directory the wget instruction can be entered to download the software.
- The download takes approx 3 minutes.
- Enter the command wget https://downloads.arduino.cc/arduino-1.8.19-linuxarm.tar.xz
- Alternatively you can also go to the Arduino website and download the file directly to the Raspberry Pi.
wget https://downloads.arduino.cc/arduino-1.8.19-linuxarm.tar.xzUnpack the Arduino IDE application
- Enter the following command to unpack the package tar -xvf arduino-1.8.19-linuxarm.tar.xz
- x - extracts the files
- v - verbose mode so all extraction operations will be shown in the Terminal
- f - specifies the name of the archive file we are extracting files from, in this case arduino-1.8.19-linuxarm.tar.xz
tar -xvf arduino-1.8.19-linuxarm.tar.xz- Once the package in unpacked enter the newly created folder named arduino-1.8.19.
- You can use the Tab key to complete the file name (cd arduino + Tab)
Installing the Arduino IDE Application
- Once in the directory there is an install.sh scripting file that will complete the installation.
- Make this file executable with the command sudo chmod +x install.sh
- If the file is already executable you can ignore this step.
- Start the install with the command sudo ./install.sh
Running the Arduino IDE Application
- The installation process adds an entry into the Raspberry Pi OS drop down menu.
- You can find the Arduino IDE entry under the Programming heading.