#include <Servo.h>
Servo myservo;
int temp = 0;
int temp1 = -45;
void setup() {
myservo.attach(9);
myservo.write(0);
delay(500);
}
void loop() {
for(temp = 0; temp = 90; temp ++ 1) {
myservo.write(temp);
}
delay(1000);
for(temp = 90; temp = temp1; temp -- 1) {
myservo.write(temp);
}
delay(1000);
}
Co tu nie tak???
Chcę, żeby Servo ,,poszło do przodu" o 90 stopni, a potem poszło od punktu 0 do -45 stopni