UDOO X86 Serial Libraries Examples

Serial Libraries Communication Samples for UDOO Board

These example’s scripts are meant to demonstrate how to implement a uni\bidirectional communication between an Arduino sketch (running on the Arduino™ Leonardo ATmega32U4 embedded) and a binary application on the Braswell processor running Linux.

The Arduino sketch will remain the same no matter which programming language you’ll use to develop the binary on Linux.

Heads up! The sources could be used also for Windows programs, however the libraries installation and compilation instructions aren't valid.

There are two example scripts for each programming language: C, Java, PHP, Python.

You can find the whole repo in our Github Channel. Clone the repo in your system and switch to proper udoo-x86 branch using these commands on a terminal:

git clone https://github.com/UDOOboard/serial_libraries_examples.git
cd serial_libraries_examples
git checkout udoo-x86

Heads up! Make sure the user has the proper permission to read and write from the Arduino™ Leonardo serial device (/dev/ttyACM0 by default)

Each program is meant to be executed while the matching Arduino Sketch is running on Arduino™ Leonardo ATmega32U4.

Program the Arduino™ embedded with the sketch named arduino_serial_example.ino before run these examples:

c_serial_example.c
java_serial_example.java
php_serial_example.php
python_serial_example.py

Program the Arduino™ embedded with the sketch named arduino_serial_example_bidirectional.ino before run these examples:

c_serial_example_bidirectional.c
java_serial_example_bidirectional.java
php_serial_example_bidirectional.php
python_serial_example_bidirectional.py

Useful libraries to communicate with Arduino from a software on the Braswell processor

Firmata

The Firmata library implements the Firmata protocol for communicating with software on the host computer. This allows you to write custom firmware without having to create your own protocol and objects for the programming environment that you are using.

You can check the Firmata documentation in the Arduino Reference page or the firmata wiki page.
Here you find the Firmata firmware for Arduino.
You can install the Firmata library directly from the Arduino IDE library manager.

This page was last updated on Monday, March 21, 2022 at 5:22 AM.