replacing loops.pause -> pause, loops.forever -> forever
This commit is contained in:
@ -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 {
|
||||
|
@ -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)
|
||||
})
|
||||
```
|
||||
|
||||
|
Reference in New Issue
Block a user