Tutorial - Running the Arduino IDE on the BeagleBone Black

How to Run the Arduino IDE on the BeagleBone Black

How to Run the Arduino IDE on the BeagleBone Black

How to Run the Arduino IDE on the BeagleBone Black

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.

Arduino Start on BeagleBone Black

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)

Arduino Board configure on BeagleBone Black

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

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

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

Arduino serial port selection

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)

One Comment

  1. Miranda
    January 31, 2017

    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

Leave a Comment

Your email address will not be published.