IOIO Library for Processing
Java Logos Processing CSS Shell C
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


IOIO Library for Processing

The aim of this library is to make using the IOIO hardware development board in Processing simple, cutting down as much boilerplate code as possible. Works in both Java mode (desktop sketches) and Android mode.

inspiration from

and of course

currently built on top of

  • IOIOLib v3.30 (App-IOIO0330)
  • Processing 2.0

tested devices and modes

Device Android ADB Android Bluetooth Android OpenAccessory (ADK) PC USB PC Bluetooth
IOIO Yes (Android OS < 4.2.2) Yes Yes N/A Yes
Droidalyzer / IOIO Mint Yes (Android OS < 4.2.2) Yes Yes N/A Yes
IOIO-OTG Yes (Android OS < 4.2.2) Yes Yes Yes Yes
(thanks Jordan of SFE for the IOIO-OTG board!)

See IOIO Over OpenAccessory for more info on IOIO's Accessory support. Also, check out the Android Accessory Tool to easily add Android OpenAccessory support to your sketch.

A note about the "Android OS < 4.2.2" thing: Secure USB Debugging has been introduced in 4.2.2. What this means is any host that wants to connect to an Android device will have to go through an RSA key-exchange dance to do so. The IOIO firmware does not (yet?) support RSA keys. To do so would mean some coding effort and compiling the IOIO firmware with libcrypto (which has its own export rules problems). For now, ADB on OS 4.2.2 is a no-go.


  1. Download the latest master zip.
  2. Rename downloaded zip file to, and unzip it.
  3. Copy folder to your sketchbook's library folder (see How to Install a Contributed Library)

How to use

  1. Instantiate and start a PIOIOManager in your sketch's setup function: new PIOIOManager(this).start();
  2. define functions void ioioSetup(IOIO ioio) and void ioioLoop(IOIO ioio) in your main sketch.
  3. (Android Mode): Don't forget to enable Internet (for USB ADB connections) and/or Bluetooth (for bluetooth dongle connections) Android permissions in your sketch.

Example: IOIOBlink.pde

import ioio.lib.api.*;
import ioio.lib.api.exception.*;
import com.pinkhatproductions.pioio.*;

// for connection to pc host
static {
  // leave commented out to auto-discover serial port (SLOW!)  
  //System.setProperty("ioio.SerialPorts", "/dev/tty.usbmodem1411");

void setup() {
  size(displayWidth, displayHeight);
  new PIOIOManager(this).start();

void draw() {

private DigitalOutput led;

void ioioSetup(IOIO ioio) throws ConnectionLostException {
  led = ioio.openDigitalOutput(IOIO.LED_PIN, true);

void ioioLoop(IOIO ioio) throws ConnectionLostException {
  led.write(false); // status LED is active LOW
  try {
  catch (InterruptedException e) {

  try {
  catch (InterruptedException e) {


pioio is licensed under LGPL 3.0

  This library is free software; you can redistribute it and/or
  modify it under the terms of the GNU Lesser General Public
  License as published by the Free Software Foundation, version 3.0.

  This library is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  Lesser General Public License for more details.

  You should have received a copy of the GNU Lesser General
  Public License along with this library; if not, write to the
  Free Software Foundation, Inc., 59 Temple Place, Suite 330,
  Boston, MA  02111-1307  USA
      PinkHatSpike -

pioio is built on top of Processing, Processing for Android, IOIOLib, JNA, and PureJavaComm, each of which carries its own license and terms.