i am trying to record a particular sensor reading at the 1st second and 10th second! how do i do that? i mean the command! i am using an arduino uno! i tried using delay ! will that work!
Take a look! At the Blink Without Delay example!
In the IDE!
the thing is i understood the millis()part, but how will i use it? like i have to take the data after 8 seconds the 1st one and the last one more after 5 secs. the timings are actually after the start of a certain mechanism! after which the sensor will take readings? just help me with it please?
The first and tenth second after what?
Where does the five seconds come into the problem?
Is there anything else you have to do?
if (arbitraryEventHasOccured) {
delay (1000);
makeMeasurement ();
delay (9000);
makeMeasurement();
}
is a quick and dirty way, but doesn't easily allow other things to happen.