As @DrAzzy says, it could be to do with the initialisation of the display - I see you're setting pin B13 up - is that somehow connected to the display?
There's also an issue with the 1v71 firmware (I've fixed this in current builds but haven't yet released an 'official' firmware) that means that right after power on, timeouts that are created from onInit (or something called from it, like the display driver) may not be the correct length. You could try adding setTime(getTime()) at the top of onInit and see if that helps?
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.
As @DrAzzy says, it could be to do with the initialisation of the display - I see you're setting pin B13 up - is that somehow connected to the display?
There's also an issue with the 1v71 firmware (I've fixed this in current builds but haven't yet released an 'official' firmware) that means that right after power on, timeouts that are created from
onInit
(or something called from it, like the display driver) may not be the correct length. You could try addingsetTime(getTime())
at the top of onInit and see if that helps?