822227eb48
* Add brick button topics * Add the rest of the brick api
32 lines
520 B
Markdown
32 lines
520 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.printPorts();
|
|
```
|
|
|
|
## 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()
|
|
```
|