You're probably connected by USB? The device doesn't bother going to sleep when it's on USB because it knows power consumption isn't a big deal.
Also, does the LED go off when you connect with the Web IDE? What can happen is the software ends up waiting to send characters over USB (even if it's only Loading xyz bytes from flash... Running onInit().... When the IDE or a terminal is connected then they can drain and the device can return to sleep.
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.
You're probably connected by USB? The device doesn't bother going to sleep when it's on USB because it knows power consumption isn't a big deal.
Also, does the LED go off when you connect with the Web IDE? What can happen is the software ends up waiting to send characters over USB (even if it's only
Loading xyz bytes from flash... Running onInit()...
. When the IDE or a terminal is connected then they can drain and the device can return to sleep.