Home>Posts>I/O Embedded & IoT, I/O HUB>How to Run the Arduino IDE on the BeagleBone Black

How to Run the Arduino IDE on the BeagleBone Black

By ·Categories: I/O Embedded & IoT, I/O HUB·Published On: September 24th, 2014·2.7 min read·

The popularity of inexpensive development boards has exploded in the last few years. The BeagleBone Black and Arduino UNO are two examples of low cost, versatile development platforms that both weekend tinkerers and professional embedded engineers alike have begun to embrace for their potential in creating a huge array of innovative devices and appliances. Because each board has its own strengths, many users have been experimenting with writing and executing programs on both. But what if you’d like to utilize the BeagleBone Black for your program development, before implementing your code on the Arduino board?

In our latest Inspire tutorial we walk through the steps to enable you to run the Arduino IDE (Integrated Development Environment) on the BeagleBone Black. The programs you create through the Arduino IDE run on your Arduino board (not the BeagleBone). This tutorial will allow you to use the BeagleBone to run the Arduino software, enabling you to develop your Arduino programs as you would on a PC or laptop.

Overview

This tutorial shows you how to run the IDE (Integrated Development Environment) on the BeagleBone and download your programs to your Arduino board. The program you create runs on your Arduino board (not the BeagleBone). You use the BeagleBone to run the Arduino software in order to develop your programs (as you would on a PC/laptop).

What You Will Need

  • BeagleBone Black
  • HDMI Cable to connect to your HDMI Display Monitor(optional)
  • Mini Keyboard with Trackball Mouse (optional)
  • AC adapter 5 Volts, 2 Amp (required)
  • BeagleBone expandable case Orange or Black (recommended)
  • Ethernet cable for internet connection (recommended)
  • Arduino Board (example: UNO, MEGA…)
  • Debian Linux

Step 1 – Download Arduino For BeagleBone

sudo apt-get arduino

Step 2 – Start Arduino IDE From Desktop VNC Or Direct (Monitor+Keyboard)

You can start the Arduino IDE from the BeagleBone Desktop. You must have a monitor and keyboard attached or VNC into the BeagleBone to see the graphical desktop.

You can also just type arduino (at the Debian Desktop terminal).

arduino

BeagleBone Black arduino

Step 3 – Configure Arduino Board

Next, setup the Arduino software for the type of Arduino board you have. (Arduino Uno in this example)

Step 4 – Configure Download Interface

Once you have the Arduino plugged-in and have powered up the BeagleBone, you should be able to see it loaded as a USB device.

lsusb


You can now select the port to download to your Arduino program.

File -> Tools -> Serial Port : /dev/ttyACM0

Compile, Download Your Programs

Load a program.
You can use one of the supplied examples to check out your new connections.
Complile the program using the (check) icon.
Transfer the program to your Arduino using the (right pointing) icon.
Your program is downloading to the Arduino and will start shortly.

Arduino interface BBB

Additional Notes

Note: Arduino “*.ino” files can be run in Cloud9 IDE as well (Starting with BeagleBone rev C / Debian)

Share

About the Author: Richard St-Pierre

Avatar
Richard worked as the Senior Electrical Engineer at Logic Supply before relocating with his family in 2015. A general problem solver and well-known "Lab MacGyver", Richard is always on the lookout for creative approaches to design solutions and continues to explore new opportunities to build creative solutions to common challenges.
Follow OnLogic on LinkedIn

3 Comments

  1. Avatar
    Miranda January 31, 2017 at 1:03 pm

    Hi I had a question about the arduino code. I have a code that works for Arduino reading data from the MPU920 but want to run it using a BBB to try and make it more robust and faster. Is there a way for me to run the .ino file on the BBB instead of having to rewrite it? Thanks

  2. Avatar
    Daniel Escasa August 19, 2019 at 1:34 pm

    I believe the command to install the Arduino IDE is apt-get install arduino, not apt-get arduino

  3. Avatar
    Daniel Escasa August 19, 2019 at 1:38 pm

    Miranda, offhand, I’d say no. For one, the pinouts of the Arduino and Beagle are different. Before I started writing this reply, I thought of a container such as Docker — if you had enough space on your Beagle. Then I remembered the difference in pinouts. Shouldn’t be too hard to rewrite, after all, how big can an Arduino program get?

Leave A Comment

SHARE

Have a project? Let's talk