====== MOVEMENT serialread > arduino ====== #include Servo emperor; // create servo object int incomingByte = 0; // for reading incoming serial data int data = 11; // define data pin void setup() { Serial.begin(9600); // opens serial port, sets data rate to 9600 bps emperor.attach(data); } void loop() { // send data only when you receive data: if (Serial.available() > 0) { // read the incoming byte: incomingByte = Serial.read(); // turn the servo in the direction of received data: // 0-90 spin counter-clockwise // 90 stop // 90-180 spin clockwise emperor.write(incomingByte); } }