Question: Code for servo clock hand. Arduino I am using the servo motor to emulate a second hand. The second hand has to move every second
Code for servo clock hand. Arduino
I am using the servo motor to emulate a second hand. The second hand has to move every second and complete a sweep in a minute. When the second hand is back at its starting point it should be 2 minutes from when it started moving.
this is what i have so far. How can I make this continuous since this code is only for one sweep.
if(sec<60){ angle = map(sec, 0, 60, 0, 180); servo.write(angle); }
if (sec>60){ angle2 = map (sec, 60, 120, 180,0); servo.write(angle2); }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
