Home
About
Info about V1
What's New in V2
What's New in V3
Release Notes
Pi4J Downloads
License (Open Source)
The Team
Prepare a Raspberry Pi
Write OS to SD card
The First Boot
Install Java and Tools
Getting Started With Pi4J
Understanding the GPIO pins
Electrical Engineering
Java Development
Minimal example application
Minimal example as FAT JAR
User interface with JavaFX
Game development with FXGL
FXGl to Picade
JavaFX kiosk mode
JavaFX GUI and MVC template
Learn more...
Documentation
Pi4J API JavaDoc
Pin numbering
Java for ARMv6/7/8
Logging with SLF4J
Creating a Pi4J Context
Choosing a Platform
Raspberry Pi
Choosing an I/O Provider
GpioD Provider
LinuxFS Provider
PiGpio Provider
Using Board Info
Building an I/O Instance
I/O Types
Digital Output (GPIO)
Digital Input (GPIO)
Pulse Width Modulation (PWM)
Inter-Integrated Circuit (I²C)
I²C Clock Stretching
Serial Peripheral Interface (SPI)
Serial (UART/RS232)
1-Wire
I/O Registry
Shutdown (cleanup)
Building and running
Building with javac
Build as a FAT JAR with Maven
Build Java modules with Maven
Build Java modules with Gradle
Running Pi4J with JBang
Development Tools
Install Visual Studio Code
Using IntelliJ IDEA
Using Maven Archetype
Example Implementations
JBang Examples
Minimal Example
8x8 LED Matrix
BME280 Sensor
Pixelblaze Output Expander
Controlling a LED Matrix
LED strip with a JavaFX UI
Component Examples
Simple Button
Simple LED
AD Converter ADS1115
Buzzer
Camera
Joystick
Joystick Analog
LCD Display
LED Button
LED Matrix
LED Strip
Potentiometer
ServoMotor
Electronics with CrowPi
Develop with Intellij IDEA
CrowPi examples
Community Implementations
Prototype Board
BMP280 Sensor
Debugging Failures
Architecture/Design
Project source structure
Download/Install
Build Instructions
Maven settings
Code styling
Hardware testing
Advanced
Annotated provisioning
Dependency injection
Native Library Path
Plug-ins
Remote support
The Pi4J Logo
Pi4J with Kotlin
Pi4J Kotlin DSL
Minimal Kotlin Pi4J example
Kotlin API & DSL Documentation
Coroutines Support
I²C Kotlin DSL
Serial Kotlin DSL
Kotlin Examples
Basic Project Setup
Useful Tips
Blogs
2025
IO Checker Tool
Java 21+ Working on RPi Zero 2
RPi5 PWM NoSuchFileException
Java 21+ Not Working on Zero 2
Starting with a Desktop Icon
Pi4J welcomes Java 21
Pi4J presentation for Miami JUG
2024
Pi4J in Floss Weekly
Maven Downloads
Signed versus unsigned values
Bosch sensor gas measurement
Interview Tom Aarts
PWM Hardware Support on RPi5
Interview Robert von Burg
Ongoing I2C Improvements
LED Matrix with SPI MAX7219
Alexander Liggesmeyer and RPi5
2022
LED strip with Pi4J and JBang
Kotlin on the Raspberry Pi
Getting Started Template
Videos
2025 Devoxx Talk FFM API
2025 Live Coding: Vaadin
2025 Live Stream CyberJAR
2024 Spring Boot Starter
2023 LED strips with JBang
2023 Vaadin WebUI
2022 Building Smart Devices
2021 Electronics on RPi
2021 Future of Java on RPi
2013 JavaOne Interview
Featured Projects
Spring Boot Alarm System
SmartCoop
Binary Clock
Soft real time PLC
PiJukeBox
CocktailPi
Didier the street artist robot
JMonkeyEngine with Joystick
Sensor drivers
More
Tags
GitHub project
Mastodon @pi4j@foojay.social
LinkedIn @pi4j
Pi4J V2 Discussions
Join our Slack
Built with
from
Grav
and
Hugo
Visitor counter by
Clicky
Welcome to Pi4J
>
Tags
> DHT22
tag :: DHT22
Community Implementations