navigation

Java I/O for the Raspberry Pi & other SBCs

A friendly, object-oriented API to access GPIO, I2C, SPI, PWM and Serial — so you can focus on your application logic, not the native layer.

🚀
Latest release: V4.0.2 · 2026-06-08 Built on Java 25, with the new Foreign Function & Memory (FFM) plugin replacing native JNI calls.

Latest from the blog

All posts →

Latest videos

All videos →

Why Pi4J?

Pi4J provides a friendly, object-oriented I/O API and implementation libraries for Java programmers to access the full I/O capabilities of the Raspberry Pi platform. It abstracts away the low-level native integration and interrupt monitoring, so you can focus on your application’s business logic.

Ready to dive in?

Pi4J has been helping Java developers blink LEDs, read sensors, build kiosk interfaces, and control robots since 2012. In February 2026 the project joined the Commonhaus Foundation to secure its long-term future. Learn more about the project’s history and versions.

Pi4J V4 overview