replacing loops.pause -> pause, loops.forever -> forever

This commit is contained in:
Peli de Halleux
2018-02-14 16:05:31 -08:00
parent 0384eb4d9d
commit daa88b299d
62 changed files with 151 additions and 151 deletions

View File

@ -14,7 +14,7 @@ sensors.touch1.isPressed()
If the touch sensor ``touch 1`` is pressed, show a `green` status light. Otherwise, set the status light to `orange`.
```blocks
loops.forever(function () {
forever(function () {
if (sensors.touch1.isPressed()) {
brick.setStatusLight(StatusLight.Green)
} else {

View File

@ -17,13 +17,13 @@ If a touch sensor was pressed, then that event is remembered. Once you check if
If the touch sensor ``touch 1`` was pressed, show a `green` status light. Otherwise, set the status light to `orange`.
```blocks
loops.forever(function () {
forever(function () {
if (sensors.touch1.wasPressed()) {
brick.setStatusLight(StatusLight.Green)
} else {
brick.setStatusLight(StatusLight.Orange)
}
loops.pause(500)
pause(500)
})
```