pxt-calliope/docs/projects/light-level-meter.md
Galen Nickel eae6e5a6be
Edit 'tools' projects (#1220)
* Edit 'tools' projects

* Rename projects and fix linking
2018-09-12 21:12:19 -07:00

340 B

Light Level Meter

Use this program to graph the light level. Press A to scroll the value on the screen.

let reading = 0
basic.forever(() => {
    reading = input.lightLevel()
    led.plotBarGraph(
        reading,
        255
    )
    if (input.buttonIsPressed(Button.A)) {
        basic.showNumber(reading)
    }
})