Bulldog Library

It is a Java library providing developers with GPIO and other low-level IO interfaces like I2C, SPI, or PWM. Currently supports various Single Board Computer (SBC) platforms, including Raspberry Pi, BeagleBoneBlack, and CubieBoard.

Bulldog aims to be platform agnostic - to write a single piece of code that can be run on multiple platforms. The only thing that needs to be changed in the following snippet is the string identifier of GPIO pin to work on different SBCs.

The latest 0.2.0 release was mainly about stabilizing and finishing platform detection capabilities, however we are already looking into our ultimate goal, that is to get rid of all filesystem interaction and omiting all the kernel modules, and interact directly with memory of the controlled SBC. This will boost the performance to the sky, so stay tuned!

Integration

There is also a component for Apache Camel that wraps Bulldog Library features. At the moment it supports only GPIO, however support for the rest of Bulldog features is already knocking on the door.

An example is worth a thousand words. The following snippet is all you need to build a REST endpoint which controls a GPIO pin on your SBC. It will work on all platforms supported by Bulldog Library.