I found them but wasn't sure if I could work with them in case they don't fire.
I worked around with this code
Bangle.on('mag', (() => { console.log("mag received"); compassEventReceived = true; })); Bangle.on('GPS', (() => { console.log("GPS received"); gpsEventReceived = true; })); Bangle.on('HRM', (() => { console.log("HRM received"); hrmEventReceived = true; })); // Wait two seconds, that should be enough for each of the events to get raised once setTimeout(() => { Bangle.on('mag', () => {}); Bangle.on('GPS', () => {}); Bangle.on('HRM', () => {}); }, 2000);
The only issue is removing the eventlisteners now. The code above fails to do that. I already posted another question for that, though ;)
@msdeibel 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.
I found them but wasn't sure if I could work with them in case they don't fire.
I worked around with this code
The only issue is removing the eventlisteners now. The code above fails to do that. I already posted another question for that, though ;)