bring back deprecated blocks, but hide them
This commit is contained in:
@ -12,7 +12,7 @@ Tell everyone who you are. Show you name on the LEDs.
|
||||
Let's build a **LOVE METER** machine. Place an ``||input:on pin pressed||`` block to run code when pin **0** is pressed. Use ``P0`` from the list of pin inputs.
|
||||
|
||||
```blocks
|
||||
input.onPinEvent(TouchPin.P0, Button.Click, () => {
|
||||
input.onPinTouched(TouchPin.P0, Button.Click, () => {
|
||||
});
|
||||
```
|
||||
|
||||
@ -21,7 +21,7 @@ input.onPinEvent(TouchPin.P0, Button.Click, () => {
|
||||
Using ``||basic:show number||`` and ``||Math:pick random||`` blocks, show a random number from `0` to `100` when pin **0** is pressed.
|
||||
|
||||
```blocks
|
||||
input.onPinEvent(TouchPin.P0, Button.Click, () => {
|
||||
input.onPinTouched(TouchPin.P0, Button.Click, () => {
|
||||
basic.showNumber(Math.randomRange(0, 100));
|
||||
});
|
||||
```
|
||||
@ -35,7 +35,7 @@ Show ``"LOVE METER"`` on the screen when the @boardname@ starts.
|
||||
|
||||
```blocks
|
||||
basic.showString("LOVE METER");
|
||||
input.onPinEvent(TouchPin.P0, Button.Click, () => {
|
||||
input.onPinTouched(TouchPin.P0, Button.Click, () => {
|
||||
basic.showNumber(Math.randomRange(0, 100));
|
||||
});
|
||||
```
|
||||
|
Reference in New Issue
Block a user