All of the Processing API can be used on the Raspberry Pi. There is some additional functions that are particularly relevant to the Raspberry Pi, as they allow Processing to make use of the Pi’s extension header pins. This functionality is available through the Hardware I/O library, and is documented below.

I2C

The I2C class communicates with peripherals over I2C interfaces.

I2C
list()
beginTransmission()
write()
read()
endTransmission()
close()

SPI

The SPI class communicates with attached devices over SPI.

SPI
list()
settings()
transfer()
close()

SoftwareServo

The SoftwareServo class controls RC servo motors attached to General Purpose I/O pins.

SoftwareServo
attach()
write()
attached()
detach()

LED

The LED class controls the computer’s build-in lights.

LED
brightness()
close()
list()

PWM

Use the SoftwareServo class for the time being. Hardware PWM has yet to be made available by the hardware platforms we support.

PWM
list()
set()
clear()
close()