I developed an hour chime function (buzz) two years ago for v1 which worked very well. After some firmware upgrades on v1, the chime had sometimes complete runaways and did not stop chiming. I had several attempts with completely different approaches to get rid of it and secured the buzz() in a way that it can only be executed once at a time. Now I tried the event triggered solution below on v2 - and there it is again. Works, works not. Does somebody see my error in the code? From my point of view it should be impossible that the buzz code is executed twice.
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.
I developed an hour chime function (buzz) two years ago for v1 which worked very well. After some firmware upgrades on v1, the chime had sometimes complete runaways and did not stop chiming. I had several attempts with completely different approaches to get rid of it and secured the buzz() in a way that it can only be executed once at a time. Now I tried the event triggered solution below on v2 - and there it is again. Works, works not. Does somebody see my error in the code? From my point of view it should be impossible that the buzz code is executed twice.
after a buzzer runaway: