Brick ref topics 02 (#283)

* Add brick button topics

* Add the rest of the brick api
This commit is contained in:
Galen Nickel
2018-01-30 20:58:18 -08:00
committed by Peli de Halleux
parent 8a331648d6
commit 822227eb48
15 changed files with 307 additions and 12 deletions

View File

@ -10,4 +10,22 @@ 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()
```