Updated Not so simple Clock,Timer,Alarm,Pong

Well after a 24 hours run test clock is 3-4min off.
So it’s consistent with my previous test.
found some more bugs while swamping between 12h and 24h display. working on fixing those.

2 Likes

Do a test with an exact period then you’ll have an offset… if it’s exact 4 min (240 seconds) every 24 hours then you need to add or subtract 10 seconds every hour - or 1 second every 6 minutes. You should be able to easily get it down to a few seconds a day.

What I don’t know is how much the crystals vary from one chip to another… so you might get it just perfect on your Arduboy only to have it off by 4 minutes on someone elses - hence you’d have to build the calibration factor into the software itself.

1 Like

Currently doing a test as per Dreamer3 then I will add an off set of 1 second every what ever is required as per test.
Also
Fixed bugs with the swap between 12h and 24h type
Added comments to virtually all lines of code.
Here on GitHub Clock Alarm Timer

i was actualy wanting to do something like this to keep track of my hours on the farm

1 Like

Well terminated the test after ~7hours and according to my calculation I need to remove 1 second every 18min32sec956mill.
So I that to the code. Thanks for the suggestion.

Here’s new version. ClockAlarmTimer

I’ve been thinking of changing the interface.
Instead of holding a button to change screens, just a single press to cycle the screens.
Also adding a stopwatch could be cool.
So many ideas and it all just started with a simple clock. hehe.

The temperature also affects how the crystal oscillates, thus probably is going to behave different on the night hours vs day.

1 Like

Well clock is still inaccurate and going ahead. so I’m doing an other 10h test.
Including the fix i did so i will add the difference.

The alarm works even if I turn off the Arduboy and then I turn it on again?

It could also vary depending on the battery charge. If you can’t get it right after one or two adjustments I’d just give up. :slight_smile:

No, there is no clock chip.

Well it’s not working. the accuracy is random.
Was a good idea.

if im not mistaken there are some extra pins left over, in theory you could solder on a clock chip there prety inexpensive

It’s an idea, but the fun of a closed platform, is anything you develop can be used by all the users.

Does it stay accurate if you leave it plugged into USB?

You could use the voltage measurement and change the offset as the battery drained, but it might take a LOT of trial and error to figure out the right curve.

There still might be a temperature dependency. You could read the CPU temperature but that might not directly relate to the crystal temperature. All in all, there would be a lot of mapping.

I did capitalize LOT. But yeah worth considering the temperature - though if this is indoors that’s likely to be constantish.

Well I here’s a new finding. I got my hand on a second Arduboy and ran a test.
One clock ran faster and the other clock ran slower. Both with the same code.
So the accuracy is again 3-4min faster or slower per 24h (Well still hasn’t been 24hours but that’s where it’s going.)

So as said previously [quote=“Dreamer3, post:22, topic:3297”]
What I don’t know is how much the crystals vary from one chip to another.
[/quote]

Now I’ll focus my efforts on improving the interface and adding a stopwatch functionality.
But I need a break from this project.

Well update again. This one is a drastic change to the interface. Enjoy.

3 Likes

it’s getting nicer, love the new interface. But can you make it play Pong and do Pong Time too ? That would be perfect 8–P

[quote=“senkun, post:39, topic:3297, full:true”]it’s getting nicer, love the new interface. But can you make it play Pong and do Pong Time too ? That would be perfect 8–P
[/quote]

Alright. I’ll see what i can do here’s some work in progress.

1 Like