2018-09-12 22:26:39 +02:00
|
|
|
# Light level Calibrator
|
2017-02-10 02:40:21 +01:00
|
|
|
|
2018-09-12 22:26:39 +02:00
|
|
|
Use this program to graph the light level.
|
2017-06-21 20:17:25 +02:00
|
|
|
Press ``A`` to scroll the value on the screen.
|
|
|
|
|
2017-02-10 02:40:21 +01:00
|
|
|
```blocks
|
2017-06-21 20:17:25 +02:00
|
|
|
let reading = 0
|
2017-02-10 02:40:21 +01:00
|
|
|
basic.forever(() => {
|
2018-09-12 22:26:39 +02:00
|
|
|
reading = input.lightLevel()
|
2017-02-10 02:40:21 +01:00
|
|
|
led.plotBarGraph(
|
2017-06-21 20:17:25 +02:00
|
|
|
reading,
|
2018-09-12 22:26:39 +02:00
|
|
|
255
|
2017-02-10 02:40:21 +01:00
|
|
|
)
|
2017-06-21 20:17:25 +02:00
|
|
|
if (input.buttonIsPressed(Button.A)) {
|
|
|
|
basic.showNumber(reading)
|
|
|
|
}
|
2017-02-10 02:40:21 +01:00
|
|
|
})
|
|
|
|
```
|