pxt-ev3/docs/reference/brick.md

32 lines
528 B
Markdown
Raw Permalink Normal View History

# 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();
2018-03-30 01:43:17 +02:00
brick.showPorts();
```
## Buttons
```cards
brick.buttonEnter.onEvent(ButtonEvent.Bumped, function () {
});
brick.buttonEnter.pauseUntil(ButtonEvent.Bumped);
brick.buttonEnter.isPressed()
brick.setStatusLight(StatusLight.Red);
2018-04-03 13:10:35 +02:00
brick.buttonEnter.wasPressed()
```
## Other
```cards
brick.batteryLevel()
```