SHOW:
|
|
- or go back to the newest paste.
1 | import processing.serial.*; | |
2 | ||
3 | - | char inputChar=7; |
3 | + | |
4 | char inputChar; | |
5 | ||
6 | void setup() | |
7 | { | |
8 | size(800,600); | |
9 | background(0); | |
10 | commsPort=new Serial(this, Serial.list()[1],38400); | |
11 | } | |
12 | ||
13 | - | while(mousePressed==true) |
13 | + | |
14 | { | |
15 | - | commsPort.write(inputChar); |
15 | + | commsPort.write(inputChar); |
16 | println(inputChar); | |
17 | if(mousePressed==true) | |
18 | { | |
19 | inputChar='1'; | |
20 | } | |
21 | else | |
22 | { | |
23 | inputChar='0'; | |
24 | } | |
25 | } |