User Tools

Site Tools


move_serialread_arduino

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

move_serialread_arduino [2014/01/23 14:30]
zoza created
move_serialread_arduino [2014/01/23 14:31] (current)
zoza
Line 16: Line 16:
   }   }
    
-    ​void loop() {+void loop() {
    
-    ​// send data only when you receive data: +  ​// send data only when you receive data: 
-    if (Serial.available() > 0) { +  if (Serial.available() > 0) { 
-    // read the incoming byte: +  // read the incoming byte: 
-    incomingByte = Serial.read();​ +  incomingByte = Serial.read();​ 
-  + 
-    // turn the servo in the direction of received data: +  // turn the servo in the direction of received data: 
-    // 0-90 spin counter-clockwise +  // 0-90 spin counter-clockwise 
-    // 90 stop +  // 90 stop 
-    // 90-180 spin clockwise +  // 90-180 spin clockwise 
-    emperor.write(incomingByte);​ +  emperor.write(incomingByte);​
-    }+
     }     }
 +}
  
 </​code>​ </​code>​
move_serialread_arduino.txt · Last modified: 2014/01/23 14:31 by zoza