Closed tballmsft closed 3 years ago
See https://makecode.microbit.org/_RVeCwjgyUAmA
The onConnected handler doesn't run on start. Note that it does run when you press the A button. Then the second time you press the A button, the button hander runs. So, from a fresh state
modules.ledPixel1.onConnected(() => { modules.ledPixel1.setBrightness(85) modules.ledPixel1.setAll(0x00FF00) }) input.onButtonPressed(Button.A, function() { modules.ledPixel1.setBrightness(85) modules.ledPixel1.setAll(0xFF0000) })
Duplicate of https://github.com/microsoft/jacdac/issues/653
See https://makecode.microbit.org/_RVeCwjgyUAmA
The onConnected handler doesn't run on start. Note that it does run when you press the A button. Then the second time you press the A button, the button hander runs. So, from a fresh state