I recently got a few continuous rotation servos, what I want to know is how the heck do I stop them?
All I want them to do is
go clockwise for 5 seconds
stop
then go counterclockwise for 5 seconds
stop
then loop^
I can't find anything anywhere on how to stop continuous rotation servos.
The value (92) only slows them down
this is what I've written so far
#include <Servo.h>
Servo servo_0;
Servo servo_1;
Servo servo_2;
Servo servo_3;
Servo servo_4;
Servo servo_5;
Servo servo_6;
Servo servo_7;
// variable to store the servo position
void setup()
{
servo_0.attach(0); // attaches the servo on pin 0 to the servo object
servo_1.attach(1); // attaches the servo on pin 1 to the servo object
servo_2.attach(2); // attaches the servo on pin 2 to the servo object
servo_3.attach(3); // attaches the servo on pin 3 to the servo object
servo_4.attach(4); // attaches the servo on pin 4 to the servo object
servo_5.attach(5); // attaches the servo on pin 5 to the servo object
servo_6.attach(6); // attaches the servo on pin 6 to the servo object
servo_7.attach(7); // attaches the servo on pin 7 to the servo object
}
void loop()
{
//Individual Servo Control
{
servo_0.write(70);
servo_1.write(70);
servo_2.write(70); //all 8 go clockwise
servo_3.write(70);
servo_4.write(70);
servo_5.write(70);
servo_6.write(70);
servo_7.write(70);
delay(5000);
}
servo_0.write(92);
servo_1.write(92);
servo_2.write(92);
servo_3.write(92);
servo_4.write(92);
servo_5.write(92); //slow down. can't get them to stop
servo_6.write(92);
servo_7.write(92);
delay(5000);
{
servo_0.write(190);
servo_1.write(190);
servo_2.write(190);
servo_3.write(190); //go counterclockwise
servo_4.write(190);
servo_5.write(190);
servo_6.write(190);
servo_7.write(190);
delay(5000);
}
servo_0.write(92);
servo_1.write(92);
servo_2.write(92);
servo_3.write(92);
servo_4.write(92);
servo_5.write(92); //slow down because I can't get them to stop
servo_6.write(92);
servo_7.write(92);
delay(5000);
}