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