For a project I'd like to plot a graph - temperature over time. I am thinking of two options that'll fit my idea.
-
Converting the millis in hh:mm:ss format
-
Showing the display time through the serial port. Making a log file via PuTTy to save the time and temperature.
So far I wasn't able to do each of those. Is there a possibility to do that without a rtc module? I the arduino will be constantly powereby the pc.
arduino uno - Can I simulate a clock without an RTC connected? - Arduino Stack Exchange
I tested Arduino time keeping without RTC
Use Time.h without a hardware RTC?
Add current time (changing) without RTC
TimeLib.h has a virtual clock that can be updated and corrected from multiple sources, including an RTC chip or an NTP server on the internet (assuming an internet connection).
It doesn't need that clock source, though, but it will drift with time. Once you have set the clock correctly it will keep close to the right time (assuming no reset or power loss of the Arduino). Not perfect (because the Arduino's main clock isn't perfect) but close enough for many simple applications.
There are programs to simulate Arduino code, but they are very limited. To really simulate the circuit the program would have to also know about the IC you are using. You didn't told us what IC this is, so we can only speculate, that it might not be something, that these programs know (though you can try it). And sometimes Arduino Simulators have problems with simulating time sensitive code. If you want to try, just google for Arduino Simulator and check out the possibilities. I cannot suggest one, since I didn't use one until now.
At this point it might be the better option to write time-keeping code using the millis() function, which returns the number of milliseconds since the Arduino started. Save a timestamp from when you started and compare the difference between millis() and your timestamp to the wanted bake time.
You can pack this code in extra functions, that can later be replaced by code managing the "timer IC". With dividing your code this way you can write the rest of the logic without bothering about the timing part (after writing the millis() part as a "dummy").
For an oven timer the accuracy of the Arduinos clock should be ok, since it doesn't really matter, if it is a few seconds off. And for testing and writing the first code version it is also sufficient.
If the IC you are referring to is a RTC (Real Time Clock) module, the code for it should be pretty simple to write. There are libraries for the most common RTCs. You might want to try the Arduino Time library.