
Pi4J Drivers V1.2.0: ePaper, DAC/ADC, Motors, and LoRa
Pi4J is the Java library that gives you access to the hardware I/O of the Raspberry Pi: GPIO pins, I2C, SPI, PWM, and serial communication. With it, you can read a button, blink an LED, or talk to a sensor from plain Java code, running on the Pi itself.
Talking to a real component, however, takes more than raw pin access. Every sensor, display, or motor controller has its own registers, commands, and timing rules. That’s where Pi4J Drivers comes in: a library on top of Pi4J with ready-to-use drivers for popular hardware components, so you can work with a high-level Java API instead of reading datasheets and writing low-level I2C, SPI, or GPIO code yourself.
A new release of the Pi4J Drivers library is available! Version 1.2.0 is a big step forward, adding support for many new components. The full announcement is on the Pi4J blog, here are the highlights.
ePaper displays
This release adds a generic SSD1680 driver, plus drivers for the Waveshare 2.7-inch ePaper display hat v2 and the large Waveshare 13.3-inch black-and-white 960x680 ePaper display. The SSD1680 and Waveshare 2.7" v2 drivers now also support partial display updates, so you no longer need to redraw (and flicker) the full screen for every small change.
Text and graphics
A new GraphicsTextAnimator makes scrolling text easy, displays can now be mirrored, and cursor management is now part of the CharacterDisplay interface.
Analog in and out
There is a new DigitalAnalogConverter interface, with reworked MCP49xx drivers and new drivers for the MCP4725, MCP4921/MCP4922, and MCP4728 DACs. On the input side, the TI ADS111x and NAU7802 ADCs are now supported, and the Mcp300xDriver is split into 10-bit (MCP3008) and 12-bit (MCP3208) subclasses.
Motors and robotics
Building something that moves? You can now use the LN298 motor driver, the ULN2003 driver, and the PiBorg UltraBorg board.
Long-range communication
Finally, a driver for the Semtech LR11xx LoRa transceiver opens the door to low-power, long-distance wireless projects in Java.
Learn more
Check the drivers release notes for all details, or compare v1.1.0 and v1.2.0 on GitHub to see every change. And as always, the Pi4J website is the place to get started with Java on the Raspberry Pi. Many thanks to all contributors who made this release possible!