MorganS:
How do you mean "wrong time"?
What does this statement mean?What are you correcting it to?
In everything i read is was said that millis() is not 1ms its like 1024us so the 16mhz crystal will input a difference along the day. And i was said that difference could be "corrected".
DrDiettrich:
A human won't be able to press a switch or touchpad with millisecond accuracy. Unless you have more precise input (light barrier...), such an accurate display is cheating.
I need the precision time in milliseconds from the touch. I mean, i press start, after a X time you touch a pad, i need the time with milliseconds elapsed from the start.
DVDdoug:
I don't think you can use anything homemade for official sanctioned sporting events.
But for unofficial use over an hour time period, the Arduino should be accurate enough.
And for example, assuming you are timing a race - If there's a 1 percent timing error (it shouldn't really be that bad), that could be significant over a 1 hour period, but if there's a 100 millisecond difference between 1st place and 2nd place, 1% of 100 milliseconds in not so significant.
You'll probably need to use an interrupt to make sure you "snap" the time exactly when you touch the pad. (It takes some time to run a loop and the more things your program is doing, the more delay there will be before you read the touch-pad.)
Probably not a good idea. Over a long period of time it would be OK, but if you "capture" one event, then adjust the time and then capture another event a short time later, you could introduce a greater error. by changing the time in the middle of a measurement.... Let's say you're running 1 minute slow every hour. Then you measure a 5-minute event and there's a 1-minute "correction" in the middle of the 5-minute measurement... That would really mess you up!
And, wat would you synchronize it to? If you've got a more accurate clock/timer, use that timer/clock instead of the Arduino's built-in oscillator with millis().
It just for study the example, we'll build a prototype for demonstration only, but a simulation from a real competition.
I said about the "correction" to be only after the stop, of at the start, let say, i press start, the arduino code "corrects" the millis() time, and store the new value and use it for the race, for a period like 5 minutes its probably ok right?