Hello, i used this code ->
http://arduino.cc/en/Tutorial/PhysicalPixel to send an byte to the arduino board. Thsi works with "mouseover". How can i change the code, so that i have to click on the box to bring the led on?
myPort = new Serial(this, Serial.list()[0], 9600);
myPort.clear();
font = createFont("Arial", 12, false);
textFont(font, 14);
}
void draw() {
background(0);
fill(0,255,0);
while (myPort.available() > 0) {
myString = myPort.readStringUntil(lf);
if (myString != null) {
print(myString); // Prints String
num=float(myString); // Converts and prints float
println(num);
text(myString,10,10);
}
}
myPort.clear();
}
The value is coming from my arduino board, i'd like to display the value, but the value does blink up shortly and dissapears then. I'd like to show it permantent.