Foojay Today

Pi4J V2.2.0 Released

August 31, 2022

One year after the first release of V.2 of Pi4J, a new release was published. Pi4J provides friendly object-oriented I/O API and implementation libraries for Java Programmers to access the full I/O capabilities of the Raspberry Pi platform.

And what an amazing achievement with this new release! No major issues were found in the previous release, but several small fixes were added by more people than ever before in the Pi4J-history. This is a real confirmation of the openness of this project and how a community can work together to further improve a project.

A big thank you to everyone who experimented with Pi4J, took part in the discussions, filed an issue, created a merge request, added examples,...!

New example implementations

Thanks to the work of FHNW University students and @taartspi, the list of available example implementations has become larger and larger.

We even moved them to their own section of this documentation website!

Take a look at Example implementations if you need a quick-start to use a buzzer, camera, LED strip, TCA9548, MCP4725,... or any of the other examples.

Changes in V2.2.0

Multiple improvements were added in this release (and others are already in progress for the next one!):

  • by @taartspi to improve SPI initialization, see #229
  • by @haumacher regarding the use of ByteBuffers, see #185
  • by @savageautomate regarding the polarity of digital output, see #93
  • by @gugrim to ensure positive values are returned from reading unless at end of file, see #164
  • by @eitch to also export LinuxFS I2C in
  • by @eitch to also copy native libs to distribution zip
  • by @hagen to be able to configure sample rate and peripheral in PiGpio
  • by Saskia Bikle to add an implementation of deregistration/shutdown for IO's
  • by @savageautomate to add a new value "flags" too SPI implementation

All the differences can be checked by comparing with the previous release 2.1.1 via this link.

The new version is available in the Maven repository and via

Earlier release notes

Release notes of the previous releases of Pi4J V.2 are available on


Related Articles

View All


  • Avatar photo
    Frank Delporte

    Frank Delporte (@frankdelporte) is a Java developer, technical writer at Azul, blogger, author of "Getting started with Java on Raspberry Pi", and contributor to Pi4J. Frank blogs about his experiments ... Learn more

Comments (0)

Your email address will not be published.

Highlight your code snippets using [code lang="language name"] shortcode. Just insert your code between opening and closing tag: [code lang="java"] code [/code]. Or specify another language.

Save my name, email, and website in this browser for the next time I comment.

Subscribe to foojay updates:
Copied to the clipboard