pxt-ev3/docs/coding/light-the-way-2.md

10 lines
286 B
Markdown
Raw Permalink Normal View History

2018-01-06 04:14:55 +01:00
# Light the way Activity 2
```blocks
sensors.color3.onLightDetected(LightIntensityMode.Ambient, Light.Bright, function () {
2018-01-06 04:14:55 +01:00
brick.clearScreen()
})
sensors.color3.onLightDetected(LightIntensityMode.Ambient, Light.Dark, function () {
2018-01-06 04:14:55 +01:00
brick.showImage(images.objectsLightOn)
})
```