pxt-ev3/docs/coding/light-the-way-3.md
Peli de Halleux 2467b3c4c9
renaming pauseforcolor to pause until color detected (#405)
* renaming pauseforcolor to pause until color detected

* pauseForLight -> pauseUntilLightConditionDetected

* on light changed -> on light condition detected

* fixing docs

* docs tweaks
2018-04-03 05:05:01 -07:00

427 B

Light the way Activity 3

sensors.color3.onLightConditionDetected(LightIntensityMode.Ambient, LightCondition.Bright, function () {
    brick.clearScreen()
})
sensors.color3.onLightConditionDetected(LightIntensityMode.Ambient, LightCondition.Dark, function () {
    brick.showImage(images.objectsLightOn)
})
sensors.touch1.onEvent(ButtonEvent.Pressed, function () {
    brick.showImage(images.objectsLightOn);
})