|
|
@ -57,6 +57,7 @@ void draw() { |
|
|
|
} |
|
|
|
|
|
|
|
void keyPressed() { |
|
|
|
println(int(key)); |
|
|
|
if (key == 'S' || key == 's') { |
|
|
|
video.pause(); |
|
|
|
makePicture(); |
|
|
@ -67,4 +68,19 @@ void keyPressed() { |
|
|
|
if (key == 'G' || key == 'g') { |
|
|
|
video.start(); |
|
|
|
} |
|
|
|
|
|
|
|
if (key == 'U' || key == 'u') { |
|
|
|
sendMessage(C_TAG, colorByteValues); |
|
|
|
} |
|
|
|
|
|
|
|
if (key == '1' || key == '2' || key == 3 || key == 4 || key == 5 || key == 6 || key == 7 || key == 8) { |
|
|
|
for(int i = 0; i<colorsN; i++) { |
|
|
|
colorByteValues[i] = (int(key)-49) == i ? byte(100) : 0; |
|
|
|
print(colorByteValues[i] + "\t"); |
|
|
|
} |
|
|
|
println(""); |
|
|
|
sendMessage(B_TAG, colorByteValues); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |