IOIO library.
in
Android Processing
•
1 year ago
I have asked this on the ioio discussion group to no avail and hope one of you might understand how to utilize the ioio library (already in java) in Processing for android?
I have made the folder and placed the library so it is recognized by processing and written code using this guide:
and here is what I have for a basic test:
-
import ioio.lib.util.*;import ioio.lib.impl.*;import ioio.lib.api.*;import ioio.lib.api.exception.*;
IOIO ioio = IOIOFactory.create();DigitalOutput led;
void setup() {size(200, 200);fill(126);background(102);ioio.waitForConnect();led = ioio.openDigitalOutput(IOIO.LED_PIN); }
void draw() {if(mousePressed) {stroke(255);led.write(true);} else {stroke(0);led.write(false);}line(mouseX-66, mouseY, mouseX+66, mouseY);line(mouseX, mouseY-66, mouseX, mouseY+66);}
The result is a compiler failure for every mention of the ioio after the initialization that looks like this:
java:30: unreported exception ioio.lib.api.exception.ConnectionLostException; must be caught or declared to be thrown
[javac] ioio.waitForConnect();
Any help or suggestions are appreciated, I think I dont understand fully how to merge the structure of the ioio examples with the more rigid structure of a processing sketch.
2