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:
Niels 2018-04-01 16:52:58 +02:00 committed by Peli de Halleux
parent 70d2c41738
commit 48c65ae7cf

View File

@ -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)
}
})
```