Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import cc.arduino.*;
- import processing.serial.*;
- Serial myPort;
- void setup(){
- println(Serial.list());
- // Open the port you are using at the rate you want:
- myPort = new Serial(this, Serial.list()[5], 57600);
- delay(1000);
- myPort.write(1);
- }
- void draw(){}
- void serialEvent(Serial myPort) {
- // read String from the serial port:
- int val = myPort.read();
- println( val );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement