Go Down

Topic: Simple analog clock (Read 690 times) previous topic - next topic

claudiu_123

Hello guys,

   I'm kinda new to programing, and i was wondering if you can help me.
   Basically i'm trying to make a clock using a micro servo. The servo has to do the 180 degrees of range in 12 hours and then return to initial position again.
   I've been using the exemple "sweep" by changing the delays, but it moves once every 6 minutes only, is it possible to make the servo advance very slowly continuously as the hour pointer does in a normal analog clock?

Thanks in advance,
Claudiu

Grumpy_Mike

Quote
I've been using the exemple "sweep"

Link please.

You can use smaller increments rather than longer delays.

claudiu_123

the smallest inscrement possile is 1, can i use the map function or something similar?

AWOL

The servo library doesn't take fractional angles.
Have you tried the library's writeMicroseconds  method?
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

claudiu_123

i haven't tried it yet because i didn't about it, could you give an exemple, or tell me where i could learn more about it?

claudiu_123

Hi,


   Thank you for your answers, it works ery good with the writeMicroseconds

permnoob

if you want to save battery/power, i see no reason you need to keep sending pulses between movements, since the servo should hold its position on its own, right?  Just move it to where it needs to be, then don't pulse again till the hand needs to increment.

Go Up