Tuesday, February 25, 2014

Things-API exposes Arduino as REST

Things-API (github), by by Vicius Senger, exposes Arduino's physical computing capabilities as REST services through Java on a Raspberry Pi. I had a chance to use it during the JavaOne Raspberry Pi Embedded Challenge.

Here's an overview of how it works...

On the Arduino side, simply declare a Device object, then add things (rest services) to it, defining the pin type and pin number, e.g., Analog pin 2. Then just loop calling the appropriate loop functions.


Then, on the Raspberry Pi side of things, you need to run Oracle Java Embedded Suite, essentially a J2EE middleware stack for computers like the Pi. Deploy the Things-API for Raspberry Pi onto the server, configure, establish communications with Arduino, and now you can call the REST services on the RPi.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.