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);
}
#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
Post a Comment