update input blocks in docs and tests

This commit is contained in:
Amerlander
2020-02-20 04:01:37 +01:00
parent 38cf0ec0c6
commit c2cdcaa40f
62 changed files with 109 additions and 115 deletions

View File

@ -48,7 +48,7 @@ keeper @boardname@, you can press button `B` on the remote to buzz and
make the score bigger on the other @boardname@.
```blocks
input.onButtonPressed(Button.B, () => {
input.input.onButtonEvent(Button.B, DAL.MICROBIT_BUTTON_EVT_CLICK, () => {
pins.digitalWritePin(DigitalPin.P1, 1);
basic.pause(500);
pins.digitalWritePin(DigitalPin.P1, 0);

View File

@ -46,7 +46,7 @@ will use ``digital write pin`` to make the other @boardname@ buzz and
make the score bigger.
```blocks
input.onButtonPressed(Button.B, () => {
input.input.onButtonEvent(Button.B, DAL.MICROBIT_BUTTON_EVT_CLICK, () => {
pins.digitalWritePin(DigitalPin.P1, 1);
basic.pause(500);
pins.digitalWritePin(DigitalPin.P1, 0);