pxt-ev3/docs/reference/brick.md
2018-04-03 04:10:35 -07:00

32 lines
528 B
Markdown

# Brick
## Screen
```cards
brick.showMood(moods.sleeping);
brick.showImage(images.expressionsBigSmile);
brick.showString("Hello world!", 1);
brick.showNumber(0, 1);
brick.showValue("item", 0, 1);
brick.clearScreen();
brick.showPorts();
```
## Buttons
```cards
brick.buttonEnter.onEvent(ButtonEvent.Bumped, function () {
});
brick.buttonEnter.pauseUntil(ButtonEvent.Bumped);
brick.buttonEnter.isPressed()
brick.setStatusLight(StatusLight.Red);
brick.buttonEnter.wasPressed()
```
## Other
```cards
brick.batteryLevel()
```