I am kinda new to the Arduino. Here I want to display the timestamp in "month, day, minute, second" format after each sampling from the connected sensor via Serial. However, the only thing I can find is the millis() function. Is there any way to translate the millis to my desired format? Many thanks.
I am kinda new to the Arduino. Here I want to display the timestamp in "month, day, minute, second" format after each sampling from the connected sensor via Serial. However, the only thing I can find is the millis() function. Is there any way to translate the millis to my desired format? Many thanks.
Sincerely,
Michael
Hey Michael - sorta new here as well - but since the Arduino has no real time clock, you'll have to derive your data from millis() and knowing the time when you start. Also keep in mind that you'll overflow your largest native storage element in ~51 days.
SystemsGuy:
Hey Michael - sorta new here as well - but since the Arduino has no real time clock, you'll have to derive your data from millis() and knowing the time when you start. Also keep in mind that you'll overflow your largest native storage element in ~51 days.
Another way to do it is not print out the timestamp in the Arduino, but instead have the reader of the serial output on the PC add the timestamp when it reads a line.