Stormer97

Pyserial for Arduino - Arduino end

May 6th, 2013
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.40 KB | None | 0 0
  1. // link to pyserial code to go with this http://pastebin.com/mtsfKPAM
  2.  
  3. int counter = 0;
  4.  
  5. void setup() {
  6.   // put your setup code here, to run once:
  7.   Serial.begin(9600);
  8. }
  9.  
  10.  
  11. void loop() {
  12.   // put your main code here, to run repeatedly:
  13.   if (Serial.available() > 0)
  14.   {
  15.     while (Serial.available() > 0)
  16.     {
  17.       Serial.println(Serial.read());
  18.     }
  19.     //Serial.println("~");
  20.   }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment