Question: How would I timestamp the output data in Arduino software (using an Uno with 1.8.13 version) so the serial monitor would display for each data
How would I timestamp the output data in Arduino software (using an Uno with 1.8.13 version) so the serial monitor would display for each data value an associated time value in seconds? I know about the milles() function and time in seconds would be this value / 1000, but I'm not sure there's any easy way of timestamping the data just using code. For example, one line of output in the serial monitor could read (temperature time) as "57.6 23" and continue time stamping the data. The code is attached below but only outputs a temperature reading after 500 ms, with no timestamp.

/* VernierTutorialThermistor (v2017) This sketch reads the temperature from a Vernier Stainless Steel Temperature Probe or a Surface Temperature Sensor once every half second. We use the Steinhart-Hart equation (in the function Thermistor) to calculate temperature from the raw voltage reading. Because of the use of log functions in the Steinhart-Hart equation, this sketch requires the math.h library.. / #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
