Hi, I've got a 'hobby' servo that I'm trying to control with the ServoTimeTimer1 library (very similar to the Servo library) but it doesn't seem to work well with the delay() function. Here's the code:
#define servoPin1 9
int ledPin = 13; // LED connected to digital pin 13
pinMode(ledPin, OUTPUT); // sets the digital pin as output
digitalWrite(ledPin, HIGH); // sets the LED on
digitalWrite(ledPin, LOW); // sets the LED off
What happens is that it often moves to the second position and then goes straight back. I guess it's because the servo library uses the same timer as the delay function. Anyone know of a way around this?
Two other small questions:
1. Should the servo vibrate when it is use? Even when it isn't moving? Seems like bad feedback circuitry if it should...
2. Where can I find a reference to all the registers and stuff needed to write things like the Servo library? Is it GCC stuff or is this info provided by Atmel somewhere?