Hello!
I am trying to make use of this code:
import processing.serial.*;
import cc.arduino.*;
Arduino arduino;
color off = color(4, 79, 111);
color on = color(84, 145, 158);
[color=#CC6600]void[/color] [color=#CC6600][b]setup[/b][/color]() {
size(470, 280);
arduino = [color=#CC6600]new[/color] Arduino([color=#CC6600]this[/color], Arduino.list()[0], 115200);
[color=#CC6600]for[/color] ([color=#CC6600]int[/color] i = 0; i <= 13; i++)
arduino.[color=#CC6600]pinMode[/color](i, Arduino.[color=#006699]INPUT[/color]);
}
[color=#CC6600]void[/color] draw() {
background(off);
stroke(on);
[color=#CC6600]for[/color] ([color=#CC6600]int[/color] i = 0; i <= 13; i++) {
[color=#CC6600]if[/color] (arduino.[color=#CC6600]digitalRead[/color](i) == Arduino.[color=#006699]HIGH[/color])
fill(on);
[color=#CC6600]else[/color]
fill(off);
rect(420 - i * 30, 30, 20, 20);
}
[color=#CC6600]for[/color] ([color=#CC6600]int[/color] i = 0; i <= 5; i++) {
ellipse(280 + i * 30, 240, arduino.[color=#CC6600]analogRead[/color](i) / 16, arduino.[color=#CC6600]analogRead[/color](i) / 16);
}
}
It was suggested in:
http://community.pachube.com/arduino/usb/processing#pachube-inputVersion 17 complains of the import function. However there isn't enough information there to help me. Advice please.
The whole thing starts here:
http://www.pachube.com/------
[/font]
(Edit: I do not kow why those strange colorization markers are here. I never see them on other code posts.)
/me