Pages: [1]   Go Down
Author Topic: SimpleSerialization - serial communication library  (Read 938 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 11
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
« Last Edit: June 13, 2009, 04:44:52 am by jaron » Logged

Boston
Offline Offline
Newbie
*
Karma: 0
Posts: 36
Arduino design
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This is interesting.  If you can serialize objects then next step might be to figure out how to do remote procedure calls.  Serializing  function arguments and return values  + identification of the function name = something like RPC or CORBA.  

So you can do something like this in Processing:

tilt = Remote:getAttitude():

Are you thinking along these line for your UAV environment ?  Or maybe communicating between multiple Ardunios ?

Thanks for a  useful addition to the Arduino world.

Bruce  smiley
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 11
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've tried to keep the library light and simple, that's why I didn't implement any of the existing protocols.

The SimpleSerialization library is part of my UAV Playground project and as such I use it for the implementation of an autopilot, for debugging and for a hardware-in-the-loop simulation.
The autopilot could run as a multi-processor application on different Arduinos and they could communicate via my library. I don't know yet how the final implementation is going to look like.
« Last Edit: June 13, 2009, 01:57:17 pm by jaron » Logged

Pages: [1]   Go Up
Jump to: