Whoops it did it again ... It happens when I detach timers and the LCD sleeps. Last code is:
Bangle.on('lcdPower',on=>{ console.log("LCD Event"); if (on) { console.log("LCD Event ON"); //state.screen=scrnClock; b.clear(); if (state.screen==scrnClock) { writeTime(); writeCircles(); state.clockDots=false; writeClockDots(); handleSecondClock=setInterval(clockUpdate, 1000); } if (state.screen==scrnDate) { writeDate(); } g.drawImage({width:240,height:190,bpp:1,buffer:b.buffer, palette: color},0,48); }else { if (handleSecondClock){ console.log("LCD Event: Clearhandle"); clearInterval(handleSecondClock); handleSecondClock = undefined; } } });
1 Attachment
@Tx started
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.
Whoops it did it again ... It happens when I detach timers and the LCD sleeps.
Last code is:
1 Attachment