I was searching for a way to exchange data (strings, integers, floats) between an Arduino and a Java application. There are already several solutions to do this but none of them really met my requirements of simplicity and reliability. So I decided to write a library that implements a mechanism called serialization/deserialization. The now called SimpleSerialization library allows you to define a data structure (or object) that will be converted into a stream which then can be sent via a serial connection.
Project page: code.google.com/p/simpleserialization
Download: SimpleSerialization-1.0.zip
What you can do with it
- debug an Arduino application in a very convenient way
- remote control an Arduino
- setup a hardware-in-the-loop simulation
- and more
An example SimpleSerialization application could be to feed an Arduino with GPS data at 5Hz and attitude data at 30Hz. In return the Arduino would send the calculated actuator commands back at a rate of 10Hz. All this data would be exchanged via a single serial connection.
Requirements
- an Arduino
- a serial connection from a PC to the Arduino
- the Arduino IDE
- a Java IDE (e.g. Processing or Eclipse)
A screenshot of a basic SimpleSerialization application in the Arduino IDE
The counterpart of the above application in the Processing IDE