Hardware I/O

The Hardware I/O library allows access to the computer's hardware peripherals, such as digital inputs and outputs, serial busses, and the like, in a fashion similar to the Arduino platform. This library is only available for embedded Linux boards with the necessary kernel drivers, such as the Raspberry Pi.

The source code is available on the processing GitHub repository. Please report bugs here.





  • PWM

    Opens a PWM channel

  • clear()

    Disables the PWM output

  • close()

    Gives ownership of a channel back to the operating system

  • list()

    Lists all available PWM channels

  • set()

    Enables the PWM output


  • SPI

    Opens an SPI interface as master

  • close()

    Closes the SPI interface

  • list()

    Lists all available SPI interfaces

  • settings()

    Configures the SPI interface

  • transfer()

    Transfers data over the SPI bus

Software Servo

  • SoftwareServo

    Opens an RC servo motor connected to a GPIO pin

  • attach()

    Attaches a servo motor to a GPIO pin

    You must call this function before calling write(). Note that the servo motor will only be instructed to move after the first time write() is called.

    The optional parameters minPulse and maxPulse control the minimum and maximum pulse width durations. The default values, identical to those of Arduino's Servo class, should be compatible with most servo motors.

  • attached()

    Returns whether a servo motor is attached to a pin

  • detach()

    Detatches a servo motor from a GPIO pin

  • write()

    Moves a servo motor to a given orientation