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
- Raspberry Pi X1
- DFR0311 Arduino Expansion Shield for Raspberry Pi model B X1
- Micro USB cable
Software Preparation
- TightVNC Viewer on your PC
- TightVNC on your Pi
- 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
-
Connect the micro usb from Meet Arduino shield to the USB host on the Pi.
-
Launch your VNC server on the Raspberry Pi.
root@raspberrypi:/home/pi# sudo vncserver -
Log in the remote desktop to Pi using TightVNC Viewer.
-
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.

-
Click "Upload" to program it.
Was this article helpful?
