• Nudging conversation about LED1 not working in Bangle.js emulator - and the fact that every IoT device must be able to blink to have its 'Hello World!' as first example - made me create this conversation.

    In deed, Bangle.js has no LED , or LED1. On the Espruino boards with LEDs, LEDs reference just particular pins of which each is connected to an on-board LED that turns on / off when pin is set or reset or written to - digitally (or analog or pwm if pin can do analog / pwm). For example: LED1.set(); , LED1.reset(); , LED1.write(true) , digitalWrite(LED1,1) , digitalWrite(B2,1) , B2.set(); - B2 is pin connected to red LED1 on Esrpruino PICO.

    BUT: Bangle.js has a graphic display... accessible as g with the function set of Espruino's Graphics object that can do way more than just turn on and off an LED of a fixed color. If you want to make the examples work that use LEDs, for example, for blinking, you can code a Software LED, or actually as many as you want, in the color you want, and the size you want... and the LED can even change the color as you go.

    For how you get what you see in still and video clip as attached - blinking small red, large green and yellow triangle LED, see next post - post #2.

    For other hints working with bangle.js and especially bangle.js emulator, see Some hints when starting with the Web IDE Emulator for Bangle.js.

    2 Attachments


Avatar for allObjects @allObjects started