update input blocks in docs and tests
This commit is contained in:
@ -15,7 +15,7 @@ led.enable(false);
|
||||
This program turns off the screen when pressing button ``B``
|
||||
|
||||
```blocks
|
||||
input.onButtonPressed(Button.B, () => {
|
||||
input.input.onButtonEvent(Button.B, DAL.MICROBIT_BUTTON_EVT_CLICK, () => {
|
||||
led.enable(false)
|
||||
});
|
||||
```
|
||||
|
@ -13,7 +13,7 @@ This program sets up the ``stop animation`` part of the program,
|
||||
and then shows a string that you can stop with button ``B``.
|
||||
|
||||
```blocks
|
||||
input.onButtonPressed(Button.B, () => {
|
||||
input.input.onButtonEvent(Button.B, DAL.MICROBIT_BUTTON_EVT_CLICK, () => {
|
||||
led.stopAnimation();
|
||||
});
|
||||
basic.showString("STOP ME! STOP ME! PLEASE, WON'T SOMEBODY STOP ME?");
|
||||
|
Reference in New Issue
Block a user