Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

Hourglass - Feather Sense Project - adjust time?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Hourglass - Feather Sense Project - adjust time?

by kickthefog on Fri Jul 24, 2020 12:10 pm

Hi Everyone.

I just completed my Digital Hourglass project and it is glorious! I am trying to understand the programming but can't grasp it really. It is here: https://learn.adafruit.com/led-matrix-h ... glass-code

I'm trying to figure out a way to see if I can adjust the timing of the sand so that it actually tells a real time like a real hourglass would. I don't necessarily mean making the animation last an hour, but perhaps changing the code so the motion becomes a 5 minute timer or a 10 minute timer? Just wondering if this can be done?

Thanks!
Pat

kickthefog
 
Posts: 2
Joined: Wed Nov 20, 2013 12:17 pm

Re: Hourglass - Feather Sense Project - adjust time?

by dastels on Fri Jul 24, 2020 12:33 pm

After looking at the code there doesn't seem to be a direct way to say "this should take 5 minutes". You can however do it indirectly by setting the value of DELAY. You'd have to play with the DELAY value to get the overall timing what you want.

Dave

dastels
 
Posts: 3404
Joined: Tue Oct 20, 2015 3:22 pm

Re: Hourglass - Feather Sense Project - adjust time?

by kickthefog on Fri Jul 24, 2020 1:26 pm

Thanks Dave,

I see what you mean. I thought the delay command was only for the "refresh" rate, because when I initially adjusted it, it changed the speed at which it "flowed". But I see now that is the only delay defined, and so I believe you are correct, no other way to do it. Adjusting the delay does work but at "delay=0.5" for example... it takes about 4 minutes and 10 seconds to run out, but it falls so slowly, that is simply does not look as "cool".

I was hoping for a way to retain the "faster flowing sand" which is a nice visual aspect, but just have it take longer. Perhaps have some of the dots "randomly re-appear" on top and then finally run out at a defined time.

I won't be figuring that out anytime soon because this is my very first build and one of my first looks at code of any kind, so i have a long way to go, but it is nice to think about the possibilities.

Thanks!
:)
Pat

kickthefog
 
Posts: 2
Joined: Wed Nov 20, 2013 12:17 pm

Re: Hourglass - Feather Sense Project - adjust time?

by dastels on Fri Jul 24, 2020 2:54 pm

Hmm.. that'd make a fun project.

Dave

dastels
 
Posts: 3404
Joined: Tue Oct 20, 2015 3:22 pm

Please be positive and constructive with your questions and comments.