system
March 26, 2012, 8:06pm
1
Does a servo move to a position (i.e. position 45degrees) or move through an angle from where it initially starts? I use the command servo.write(45). But it just seems to continuously move. I would think that it would move to the 45 degree position and stop but this is not the case. Below, is the code:
/*
Arduino Servo Test sketch
*/
#include <Servo.h>
Servo servoMain; // Define our Servo
void setup()
{
servoMain.attach(9); // servo on digital pin 10
}
void loop()
{
servoMain.write(45); // Turn Servo Left to 45 degrees
delay(1000); // Wait 1 second
}
system
March 26, 2012, 8:12pm
2
Is this different to your other thread? Are you certain it's not a 'continuous-rotation' servo? Does it stop if you set it to 90?
system
March 26, 2012, 8:13pm
3
Ya it stops when set to 90.
system
March 26, 2012, 8:15pm
4
Then it's a continuous-rotation servo. You need a proper servo.
system
March 26, 2012, 8:16pm
5
Not to sound like a noob but whats the difference? Can you find me one off of sparkfun?
Here's one: Servo - Generic High Torque (Standard Size) - ROB-11965 - SparkFun Electronics . No idea of course whether it would suit your application, but it will at least behave as you expect.