Advertisement
jcalebmartin

Untitled

Feb 1st, 2014
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. import processing.serial.*;
  2.  
  3. serial commsport
  4. char inputChar;
  5. void setup()
  6. {
  7. size (800,600);
  8. background(0);
  9. commsPort=new Serial(this, serial.list()[1]
  10. }
  11.  
  12.  
  13. void draw()
  14. {
  15. commsPort.write(inputChar);
  16. println(inputChar);
  17. if(mousePressed==true
  18. {
  19. inputChar='1';
  20. }
  21. else
  22. {
  23. inputChar='0';
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement