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
|
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()
|
|
|
|
brick.buttonEnter.wasPressed()
|
|
|
|
brick.setLight(BrickLight.Red);
|
|
|
|
```
|
|
|
|
|
|
|
|
## Other
|
|
|
|
|
|
|
|
```cards
|
|
|
|
brick.batteryLevel()
|
|
|
|
```
|