Hi, quick question.. how do I change the standard time to seconds as opposed to milliseconds?
Hint - How many milliseconds to the second?
Mark
Yes, I know that Mark.. I mean is there a way of changing the standard time on Arduino from milliseconds to seconds. I'm running a loop that adds one second each time it goes round and it'd be much easier to write + 1 than + 1000.
The processor will barely care. Why do you?
It would just make life that bit easier, is there a way to do it?
I'm running a loop that adds one second each time it goes round and it'd be much easier to write + 1 than + 1000.
Then keep your own counter make sure it's unsigned.
Mark
There's an array which contains a load of time values too, also the interface needs to be nice for the guy I'm writing it for and seconds would be clearer. Is there a way to do it or not?
Declare a constant 1000.
Call it ONE_SECOND.
Ah, of course. Cheers
However, that doesn't solve the problem of all the time values in the array. Any way round that you can think of? Besides just leaving a note that the values are in milliseconds.
You haven't posted any code, so I have no idea what
the problem of all the time values in the array
is.
I'll quit hand-waving if you will.
ajr93:
Is there a way to do it or not?
Of course there is. You have a time value in milliseconds. You know how many milliseconds there are to the second. How do you suppose you could convert the time in milliseconds to the time in seconds?