Filed under: Programming
Now that the program is correctly set to a 24 hour clock format, the aim is to get the clock as accurate as possible. In the earlier programs I used ‘for next loop’ commands to set the time. The amount of times it loops determines how long the minute’s digit takes to count, which then triggers the other digits. Due to the amount of ‘let’ commands being repeated this effects how many loops are needed. The more let commands the fewer loops you need to time a minute. Much time was spent trying different amount of loops and amounts of ‘let’ commands to get as close as possible to one minute. It should be remembered that the amount of ‘let’ commands in the loop control the brightness and evenness of the four digits.
I recognised that by getting the minutes as accurate as possible allowed me to experiment with time over 12 hours. There were a number of different methods for getting within 30 seconds of real time over 12 hours. But in order for my clock to display the time accurately over months even years I need a method of timing it over 24 hours. I decided that if I could get the clock running, if anything a little, fast then I could use a ‘pause’ in the program after 24 hours to stop the clock for the amount of time it is fast. This then makes the clock accurate within seconds over 24 hours. The program above runs within a few seconds of real time over 24 hours but has to pause at midnight for four minutes. With more time I could experiment over a period of one week even one month and see how fast or slow the clock is. As long as it is fast in the first 24 hours it would just be a case of altering the pause to the exact amount its fast or slow.
No Comments Yet so far
Leave a comment
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>