Quantcast
Channel: Arduino Forum - Latest topics
Viewing all articles
Browse latest Browse all 15544

3 servo with a battery

$
0
0

please help I'm trying to make 3 servos run with this code but it is not working when I connect it to the battery
I'm using arduino uno

#include <Servo.h>

Servo servo1;
Servo servo2;
Servo servo3;
int i=0;



void setup() {
  servo1.attach(9);
servo2. attach(10);
servo3. attach(11);
}

void loop() {

  for (i=0; i < 180; i++);
    
  {
    servo1.write(i);
    servo2.write(i);
    servo3.write(i);
    delay(10);
  }


  for (i=180; i > 0; i--); {
    servo1.write(i);
    servo2.write(i);
    servo3.write(i);
    delay(10);
  }
}

3 posts - 3 participants

Read full topic


Viewing all articles
Browse latest Browse all 15544