renaming brick.setLight to brick.setStatusLight (#307)
* renaming brick.setLight to brick.setStatusLight * updated docs
This commit is contained in:
@ -34,11 +34,11 @@ Set the brick light to green when the `down` is pressed. When the button is not
|
||||
let isRed = false;
|
||||
loops.forever(function() {
|
||||
if (brick.buttonLeft.isPressed()) {
|
||||
brick.setLight(BrickLight.Green);
|
||||
brick.setStatusLight(StatusLight.Green);
|
||||
isRed = false;
|
||||
} else {
|
||||
if (!isRed) {
|
||||
brick.setLight(BrickLight.Red);
|
||||
brick.setStatusLight(StatusLight.Red);
|
||||
isRed = true;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user