Serving up some Raspberry Pi

I have been working on a webservice that exposes the Raspberry Pi GPIO pins and attached devices. The project, which I’m calling WS4Pi, is available on github here. Please check the, which contains the most up-to-date information about the current state of the project.

The project is written entirely in Java 11 (well, mostly except for some JNI) and uses the pi4j libraries. When I first started this a few years ago, Java 8 was still the popular kid on the block and pi4j included a treasure trove of support classes for various hardware devices. Unfortunately somewhere between version 1.3 and 1.4, pi4j moved from Java 8 to 11. In this transition pi4j dropped support for the components and devices classes. Arghhh! So I forked the pi4j project and created a branch which includes the component & devices support classes compiled for Java 11. The fork/branch is appropriately named “release/1.4+3” which can be found here.

For the HTTP server bits of this project I’m using the Undertow libraries. Undertow is a light-weight HTTP/HTTP2/Web Sockets server suitable for embedded applications. It also forms the backbone of the JBoss wildfly app server.

This combination has worked out very well. I’m on the path to building a solid framework for serving up some Raspberry Pi!

Leave a Reply