Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import processing.serial.*;
- Serial myPort;
- void setup() {
- size(360, 640);
- background(102);
- noStroke();
- fill(0, 102);
- printArray(Serial.list());
- myPort = new Serial(this, Serial.list()[0], 9600);
- }
- void draw() {
- while (myPort.available() > 0) {
- //int inByte = myPort.read();
- int inByte = 20;
- rect(0, 640, 600, (-5 + -inByte));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement