Thing ยท Pi4J 2.0.0
PCA9685 PWM Controller
Controls 16 PWM channels over Raspberry Pi I2C and persists channel titles and values.
// Configuration
| Parameter | Description | Default |
|---|---|---|
| I2C bus | Raspberry Pi bus 0 or 1. | 1 |
| I2C address | 0x40โ0x47 or all-call 0x70. | 0x40 |
| Frequency | PWM frequency from 24 through 1500 Hz. | 300 Hz |
Hardware: enable I2C, verify the address, share ground, and power servos or other loads from a suitable external supply.
// Use cases
16
PWM expansion
Add 16 channels for servos, LEDs, or external driver inputs.
AUTO
Rule-driven channels
Apply pulse-width or duty-cycle values from Event Manager.
PAD
Two-axis control
Map gamepad axes to two channels for pan/tilt or steering.
// Remote API
readBoard / readChannelListDropdown
Returns channel state or action dropdown values.
updateChannelTitle
Persists a channel title.
setChannelPulse / setChannelDuty
Applies a PWM value.
disableChannel
Disables an output.
// Events
PCA9685ChannelStateEvent
Contains channel index, pulse width, title, and enabled state.