It sounds like you're doing everything fine. Do you get any error messages when you load()?
I guess you could try initialising the LCD and DS3231 after a delay in case that's a issue? Maybe the DS3231 takes a while to work after power is applied - if you got the wrong time out of it then maybe setTime sets the time to something invalid and that breaks the timeouts?
You could try running dump() to see if any intervals/timeouts are actually set up to run, and maybe check getTime() or new Date() to see if the time is what you expect it should be.
Finally, it's unlikely I ever checked what happens if you reset the time to something else and then immediately create intervals, so I guess you could try setting the time inside a timeout?
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
It sounds like you're doing everything fine. Do you get any error messages when you
load()
?I guess you could try initialising the LCD and DS3231 after a delay in case that's a issue? Maybe the DS3231 takes a while to work after power is applied - if you got the wrong time out of it then maybe
setTime
sets the time to something invalid and that breaks the timeouts?You could try running
dump()
to see if any intervals/timeouts are actually set up to run, and maybe checkgetTime()
ornew Date()
to see if the time is what you expect it should be.Finally, it's unlikely I ever checked what happens if you reset the time to something else and then immediately create intervals, so I guess you could try setting the time inside a timeout?