Go Down

Topic: 4 Digit Seven Segment Display Countdown Timer - Minutes to (Read 16 times) previous topic - next topic

Boffin1

Sorry Dave

I havn't been checking this thread,  I must admit I didn't check the timing when I threw that code together :-)

I didnt realise you needed accuracy, the bomb timers on James Bond always take 3 minutes to count the last 5 seconds  !  :-)

I will have a look over the weekend,

With my mobile phone I can call people and talk to them -  how smart can you get ?

Wirral_guy

John

The bomb bit just seemed to creep in (maybe because of the original thread). It is actually a timer for my FIL's train club to do efficiency comps (30 mins + set amount of coal kind of thing).

In one respect it has been a good thing as it has made me investigate the code in more detail, understanding what each piece does and what affects what, so it is a good learning experience and improving my code skills immeasurably. Far better than just chucking the code in and letting it run.  XD

Dave

Boffin1

Quote
if(currentdotMillis - previousdotMillis >= 500) {
    previousdotMillis = previousdotMillis+500;
thus previousdotMilils is always at the 1/2 second interval.
If prior interval ran a little long (say 520ms)
then the next will just occur a little earler, say after 480mS.


Thats a good idea Crossroads,  I will remember to do that in future.

I will see if I can have a look at the timing Dave, just got a few fires to stamp out first.
With my mobile phone I can call people and talk to them -  how smart can you get ?

Boffin1

Any luck Dave,   ?

I still havnt had a chance to plug in an Arduino yet ...
With my mobile phone I can call people and talk to them -  how smart can you get ?

Wirral_guy

Not yet John.

I have tried quite a  few things now and can't seem to get it any better. I've even tried different crystals and AT chip (just in case!).

I think it might be an issue with the time it takes to do a digitalwrite so have been looking at adding a condition into the code so that it only attempts a write on digit change to see if that makes a difference (although I would lose the flashing colons - not too big a deal). So far it doesn't seem to make too much difference but I will see where I can go with it.

Dave


Go Up