Introduction: Programming an Arduino From Raspberry Pi

Learn how to install the Arduino IDE on your Raspberry Pi so that you can write and upload programs onto an Arduino.

Items needed:

1x Raspberry Pi

1x Arduino

Plus what ever cables are needed such as USB to Arduino.

Step 1: Install/config


Assuming you have a Raspberry Pi setup(if not chick here or look at Video above ), we start from the Terminal prompt:

  • sudo apt-get update
  • sudo apt-get dist-upgrade
  • sudo apt-get install arduino

Adding USB/Arduino support you need a configuration script from Gethub

    Add serial support for python.

    check if USBserial is working.

    • ls -ltr /dev|grep -i ttyUSB

    Step 2: Upload a Program to the Arduino

    Now since we have the raspberry pi setup lets go to the a GUI

    • startx

    Click on the start bar and look for the category "Electronics" and find the new Arduino IDE.

    You should find a blank sketch with no code. You need to determine what kind of Arduino you have and what port you are using. (note: Some knock off Arduino don't come with a firmware try this link on how to Burn Bootloader)

    Go to File > Example > 01 Basics > Blink

    You should see some code in Arduino IDE. Play around with the code. The blink sketch turns on an LED on for one second, then off for one second, repeatedly.

    Check upload, if the light blinks then it worked!!