Pages: [1]   Go Down
Author Topic: Simple analog clock  (Read 653 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 634
Posts: 34551
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I've been using the exemple "sweep"
Link please.

You can use smaller increments rather than longer delays.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 309
Posts: 26495
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The servo library doesn't take fractional angles.
Have you tried the library's writeMicroseconds  method?
Logged

"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.

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
 

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

Offline Offline
Full Member
***
Karma: 1
Posts: 175
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: [1]   Go Up
Jump to: