Trying to use the "On event from" functionality to get finer control over input from button presses. When I convert this blocks code to python in the makecode editor, I get the following code:
def on_microbit_id_button_a_evt_click():
basic.show_leds("""
. . . . .
. . . . .
. . # . .
. . . . .
. . . . .
""")
control.on_event(EventBusSource.MICROBIT_ID_BUTTON_A,
EventBusValue.MICROBIT_BUTTON_EVT_CLICK,
on_microbit_id_button_a_evt_click)
What I don't understand is how to get this control
library in the python.microbit.org editor, as there doesn't seem to be any import
statement in the converted code, and the from microbit import *
doesn't seem to include it.
Sorry if this is a stupid question and thanks in advance!