/*_________________________________________________ * * U C I C R I T T E R S T U D Y G R O U P * L E S S O N 3 * Working with Servos * S E R V O S W E E P * Ron Kessler * Created 5/13/2021 * * PURPOSE: DEMO HOW TO CENTER STANDARD SERVO * */ //---must use servo.h library that comes with Arduino IDE #include //---instantiate new servo object Servo myServo; //--- store current servo positionition int position = 0; void setup() { myServo.attach(10); // control the servo on pin 10 } void loop() { //---hold servo at 0 degrees so we can align the horn myServo.write(position); delay(15); //time to move to new positionition }