Servo motor controlled by PMW from Arduino
- The delay is added in order for the servo to move at a slower speed. Before i is incremented or decremented by 1, the loop will pause for 45 milliseconds resulting in a slower speed of the servo.
- It would b:
toyServo.write(i);
delay(Servopause);
};
for(int i = 45; i >=0; i--){
toyServo.write(i);
delay(Servopause);
};
3. It is because tone() and servo.attach() use the same timer. Thus, the two components are
conflicting in their operations.
Servo motor controlled by potentiometer and Arduino
Servo motor controlled by a pushbutton momentary switch