Example Code for Arduino Shield Programming on Pi

Last revision 2026/01/05

In this part, we will share how to program your Arduino using Pi. The steps is quite simple what you need is just installing the Arduino on your Pi and run the remote desktop to test it.

Hardware Preparation

Software Preparation

  1. TightVNC Viewer on your PC
  2. TightVNC on your Pi
  3. Arduino IDE on your Pi

To install the TightVNC on your Pi, please check the commands below.

root@raspberrypi:/home/pi# sudo apt-get update
root@raspberrypi:/home/pi# sudo apt-get install tightvncserver

And to install the Arduino IDE on your Pi.

root@raspberrypi:/home/pi# sudo apt-get install arduino

Operating Steps

  1. Connect the micro usb from Meet Arduino shield to the USB host on the Pi.

  2. Launch your VNC server on the Raspberry Pi.

    root@raspberrypi:/home/pi# sudo vncserver
    
  3. Log in the remote desktop to Pi using TightVNC Viewer.

  4. Launch your Arduino IDE. Open the blink sample sketch. Choose the leonardo as the board connected and open the right port as the picture shown.

    DFR0311_ArduinoIDE

  5. Click "Upload" to program it.

Was this article helpful?

TOP