This is code that waits for an event coming from button A.
control.waitForEvent(Button.A, EventBusValue.MICROBIT_EVT_ANY)
I want to wait for either button A OR button B to be pressed.
Is this possible?
EDIT
I know that in Scratch
this is possible with something like button.any
, also the above code is written in microjavascript
, but it is written similarly in micropython
, so maybe someone from this field can also help. Thank you.