Other languages

The Pi4J Project (Java API for accessing GPIO, PWM, I2C, SPI, UART)

3 1748
Edited by savageautomate at Nov 20, 2015 14:23

Hello Fellow Bananians,

The Pi4J Project now includes support for BananaPi and BananaPro!   

This support has just been added and only cursory tests performed, so lets call it experimental for now, but I welcome you guys to try it out and let me know if you run into any trouble.  You must use the Pi4J v1.1-SNAPSHOT builds until v1.1 gets released.  You can manually download the JARs in ZIP or the installable .DEB package from this page:

Support includes Java programatic access and control of GPIO inputs/outputs, PWM, I2C, SPI, and UART (serial).

There is no documentation yet specifically for the Banana platforms, but apart from a few subtle differences in configuring a platform and pin/bus addressing, its basically the same.  Perhaps better than documentation ... there are a number of examples (sample code) included in the build and available in the GitHub repo specific to each Banana platform:

BananaPi Examples:

BananaPro Examples:

Other notes:  You don't have to install and compile WiringPi/WiringBP seperately!  The Pi4J core JAR includes all the native libraries it needs to communicate with the hardware embeded in the JAR.


-Robert Savage

Wonderful, thanks for your support to Banana Pro and Banana Pi.

Thank you for your work @savageautomate
Many of my friends were waiting for it ;)

Great! Thanks for sharing!

You have to log in before you can reply Login | Sign Up

Points Rules