Project showcase

Arduino ♥ Linux (on UP2 Board) with Intel Mraa © CC BY-NC-SA

Use libArduino and MRAA to interact with the board OS and report some nice stats with LEDs.

  • 471 views
  • 0 comments
  • 3 respects

Components and supplies

Apps and online services

About this project

About

This experiment shows how to interact with a Linux Single Board Computer (UP^2 in this case) using Arduino language and Create Web Editor. To begin, we need a suitable OS running on the board. As of writing, we need to install UbiLinux 4.0 beta 2 to be able to access all the IO functionalities of the board.

Steps

Get an USB stick and follow the Getting Started section of Arduino Create. Select UbiLinux as target OS and follow the instructions. After about 30 minutes your UP^2 will be ready to host any Arduino sketch. To make sure not to break anything, power down the board before connecting the LEDs.

We are going to use a couple of GPIOs and the three PWM channels exposed by the Apollo Lake platform. As GPIOs, we'll use pins 8 and 10, while exported PWMs are on pins 16, 32 and 33. Pin numbering starts from upper right corner (looking at the board with the expansion connector on the bottom) and follows the typical zig-zag scheme. The pin mapping resembles the Raspberry Pi 40 pin GP-bus, so any illustrator the the RPi will just apply fine.

Once the LEDs have been connected (remember the series resistor to avoid absorbing too much current) power up the board, wait for the boot to finish and open the attached sketch using Create. From the dropdown menu you should see an additional board, which name matches the one you chose at the end of the GettingStarted procedure.

Press upload to load the sketch and launch it on the board. All this procedure can be performed remotely; you don't need to be in the same local network of the board. You can also start and stop the execution as you wish from the "My Devices" section of Create landing page. Once the sketch is loaded, it will poll some well known Linux command line utilities to get the Ethernet adapters status (if a cable is connected) and the system load.

Finished

The load average (for the last 1, 5 and 15 minutes) is mapped as a value between 0 and 255 and these values are associated to the LEDs brightness. At a glance you can see if the board is being overloaded by some other task and maybe take some actions (like spinning an alternative cooling system).

Schematics

Cabling
Up2 leds bb gnal6juocf

Code

Linux Arduino Integration demo

Comments

Similar projects you might like

Development Board for AtTiny MCU

by Vincenzo G.

  • 188 views
  • 0 comments
  • 6 respects

The Magnetic Field and RGB Tester

Project tutorial by Kutluhan Aktar

  • 432 views
  • 0 comments
  • 6 respects

Version 2.0 Advanced Attendance System (Without Ethernet)

Project tutorial by GadgetProgrammers

  • 3,158 views
  • 5 comments
  • 44 respects

How To Use DS18B20 Water Proof Temperature Sensor

Project showcase by IoTBoys

  • 269 views
  • 0 comments
  • 4 respects

Control LED Using Your Voice Command

by IoTBoys

  • 1,190 views
  • 1 comment
  • 12 respects
Add projectSign up / Login