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

@ -24,7 +24,7 @@ bluetooth.stopAdvertising();
## Example: stop advertising on button pressed
```blocks
input.onButtonPressed(Button.A, () => {
input.input.onButtonEvent(Button.A, DAL.MICROBIT_BUTTON_EVT_CLICK, () => {
bluetooth.stopAdvertising();
})
```

View File

@ -27,7 +27,7 @@ bluetooth.onBluetoothDisconnected(() => {
basic.showString("D");
connected = 0;
});
input.onButtonPressed(Button.A, () => {
input.input.onButtonEvent(Button.A, DAL.MICROBIT_BUTTON_EVT_CLICK, () => {
if (connected == 1) {
bluetooth.uartWriteLine("HELLO");
}

View File

@ -27,7 +27,7 @@ bluetooth.onBluetoothDisconnected(() => {
basic.showString("D");
connected = 0;
});
input.onButtonPressed(Button.A, () => {
input.input.onButtonEvent(Button.A, DAL.MICROBIT_BUTTON_EVT_CLICK, () => {
if (connected == 1) {
bluetooth.uartWriteString("HELLO");
}