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.
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.
