Program Your Arduino From Your Raspberry Pi

Program Your Arduino From Your Raspberry Pi © GPL3+

What? Program an Arduino from your Raspberry Pi? It's possible, and super easy!

  • 6,724 views
  • 4 comments
  • 24 respects

Components and supplies

Apps and online services

About this project

Can't find the right computer to program your Arduino? Or are you running short on available computers around the house to use?

Well, worry no more, my friends. This will take very little time and will get your Raspberry Pi to program your Arduino.

Step 1: Boot up your Raspberry Pi

Connect your Raspberry Pi to a power source and a monitor. Once logged in, navigate to your browser.

Step 2: Download the IDE

Head to this link: https://www.arduino.cc/en/Main/Software

Scroll down a bit and click on "Linux ARM 32 Bits" on the right.

You will then be redirected to a "Contribute" page. If you want to donate money to Arduino, this is were you'll do that. If you don't want to donate, click "Just Download". A dialog box will pop up, asking where you want to save the file. Select Downloads and continue.

Step 3: Extract and Install

Now that the IDE is downloaded, you'll need to install it with Raspbian's Archiver.

Follow these steps to install and begin using the latest version of Arduino IDE:

1. Go to the Raspbian Icon at the top left corner of the Raspbian desktop. Open the menu, go to Accessories and click Archiver.

2.Go to Archive ----> Open ----> arduino-1.8.1-linuxarm.tar.xy. Wait for the red light to stop flashing at the bottom right corner.

3. Once that's done, go to Action ----> Extract. A dialog box appears. Select "All Files" and"Extract files with full path". It should be set like that as default. Click extract.

4. Wait for the extraction to be complete, the move to the terminal. Type this:

cd Downloads 
ls 
cd arduino-1.8.9
sudo ./install.sh

Once that's done, you can start using the IDE!

Step 4: Using the Arduino IDE

When your Raspberry Pi finishes rebooting, open the Raspberry Pi menu on the desktop. There should be a new section called "Electronics". In that section, there should be the Arduino IDE! Plug in your Arduino into your Raspberry Pi, open the Arduino IDE. Select the correct port, which should be /dev/tty/USB0.

To test that it works, try coding the classic Blink program attached to this post into the Arduino IDE. It should upload correctly, and it works!

Code

Classic blink programArduino
// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(LED_BUILTIN, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(LED_BUILTIN, HIGH);//turn the LED on (HIGH is the voltage level)
  delay(1000);                       // wait for a second
  digitalWrite(LED_BUILTIN, LOW);//turn the LED off by making the voltage LOW
  delay(1000);                       // wait for a second
}

Comments

Similar projects you might like

Arduino + Raspberry Pi + Ubidots Made Easy

Project tutorial by David Escobar

  • 13,094 views
  • 4 comments
  • 38 respects

Alexa Controlled LEDs Through Raspberry Pi

Project tutorial by vincent wong

  • 5,271 views
  • 5 comments
  • 23 respects

Web-Controlled LED Animations with Raspberry Pi and Arduino

Project tutorial by Bruno Portaluri

  • 12,030 views
  • 15 comments
  • 43 respects

Bridging the Raspberry Pi and the Arduino

by Daniel Porrey

  • 12,400 views
  • 10 comments
  • 38 respects
Add projectSign up / Login