I'm trying to turn a continious rotation servo with an Arduino micro-controller.
I want to turn the servo 1 degree to the right when pushing the right arrow-key with a serial-connection. This is my code:
const int servoPin = 6;
int incomingByte;
Servo servo;
int pos;
void setup() {
Serial.begin(9600);
pos = 0;
servo.attach(servoPin);
servo.write(pos);
}
void loop() {
incomingByte = Serial.read();
if (incommingByte == 67) {
pos++;
servo.write(pos);
}
}
What do I have to do to make him turning? Because now, it doesn't move...
Thanks a lot!!