The void function keeps repeating and it shows the temperature and the timer every millisecond so I can't see anything, I also need help making it so after it ends it makes a buzzer sound and if the temperature is 28° it starts the countdown again. The countdown also shouldn't be affected by changes in temperature in the 6 hour time span. Also I need to make a button to start the countdown, I need help urgently.
The count is controlled by intervalCount which is currently set too 1000 milli seconds or 1 second, should be pretty dead on but you can adjust the interval if needed..
added a button and a millis timer to debounce..
button is input pull up, so just need to hit ground..
I changed the timer function to return whether it has finished, returns true when done..
The buzz routine demonstrates the use of a state machine, when the buzzing is finished then it sets a flag..
a few flags were added for count started, count finished and buzz finished..
You can add more state to the buzz routine if you want to play a tune or something..
this design does rely on a fast loop, so don't add any delay() functions or you can compromise the countdown interval..
I was adjusting seconds to 10, hours and minutes at 0 in the start count function for testing, looks like it was counting proper..
I did have to change the temp calc as it was reporting like 200c, that's why I asked, could just be something in the sim, only had one temp sensor to use in there..
WoKWi pretty nice..
Actually looking at your pic, looks proper..
That's the total simulator time..
in setup there is a 2 second delay and then might be a second or so before it starts..
So yeah, looks about right..