2018-01-31 02:02:22 +01:00
|
|
|
# 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.printPorts();
|
2018-01-31 05:58:18 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
## Buttons
|
|
|
|
|
|
|
|
```cards
|
|
|
|
brick.buttonEnter.onEvent(ButtonEvent.Click, function () {
|
|
|
|
|
|
|
|
});
|
|
|
|
brick.buttonEnter.pauseUntil(ButtonEvent.Click);
|
|
|
|
brick.buttonEnter.isPressed()
|
|
|
|
brick.buttonEnter.wasPressed()
|
|
|
|
brick.setLight(BrickLight.Red);
|
|
|
|
```
|
|
|
|
|
|
|
|
## Other
|
|
|
|
|
|
|
|
```cards
|
|
|
|
brick.batteryLevel()
|
|
|
|
```
|