Are you sure B5 is connected correctly to the IRQ pin? If it was floating it could cause all kinds of issues.
Are there I2C pullup resistors somewhere in the circuit? I think it's unlikely but if there were a bad I2c connection it could really slow things down and stall the idle loop
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.
Just quickly: