Trouble with servos


hello,so i'm little new arduino, have arduino uno(real one) , tower pro sg90 servo. made code bellow try make go 160 degrees 20 degrees 1 second delay in between. 1 have ideas on whats wrong code? thanks!

#include <servo.h>
servo myservo;

void setup() {
  myservo.attach(13);

}

void loop() {
  myservo.write(160);
  delay(1000);
  myservo.write(20);
  delay(1000);

}

what doing? how have hooked up? errors when uploading?


Arduino Forum > Using Arduino > Programming Questions > Trouble with servos


arduino

Comments

Popular posts from this blog

Flip address is out of range arduino uno r3

Arduino Uno not uploading

Indesign and MathType fonts