rocketscream / TinyReflowController

An all-in-one Arduino compatible reflow controller powered by ATtiny1634R
121 stars 64 forks source link

millis() function hangs oled #9

Open unbracedcat500 opened 4 years ago

unbracedcat500 commented 4 years ago

Hello, I've noticed the IF statement (if millis() > buzzerPeriod) in case REFLOW_STATE_COMPLETE hangs the OLED. Even after pressing RESET button or re uploading the code, the OLED remains in the previous state(NO ADAFRUIT LOGO appears). Is it okay if I use delay function instead of millis to turn ON the buzzer?

rocketscream commented 4 years ago

It shouldn't, it's just a check whether the time has lapsed. I have never seen it hang until today at that stage. You can't use delay because we need to stay in that state while servicing other processes (read sensor, update OLED). Using delay means blocking those processes.

VILLO88 commented 3 years ago

i am having the same problems, has anyone found a solution?