make example code work with blocks (#723)
The example code used javascript that can't be made in blocks. After this change it can be reproduced in blocks.
This commit is contained in:
parent
70d2c41738
commit
48c65ae7cf
@ -32,9 +32,9 @@ This program shows `1` if `P0` is pressed, and `0` if `P0` is not pressed:
|
||||
```blocks
|
||||
basic.forever(() => {
|
||||
if (input.pinIsPressed(TouchPin.P0)) {
|
||||
basic.showNumber(1, 150)
|
||||
basic.showNumber(1)
|
||||
} else {
|
||||
basic.showNumber(0, 150)
|
||||
basic.showNumber(0)
|
||||
}
|
||||
})
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user