light the way activities
This commit is contained in:
9
docs/coding/light-the-way-1.md
Normal file
9
docs/coding/light-the-way-1.md
Normal file
@ -0,0 +1,9 @@
|
||||
# Light the way Activity 1
|
||||
|
||||
```blocks
|
||||
sensors.color3.onLightChanged(LightIntensityMode.Ambient, LightCondition.Dark, function () {
|
||||
brick.showImage(images.objectsLightOn)
|
||||
loops.pause(5000)
|
||||
brick.clearScreen()
|
||||
})
|
||||
```
|
10
docs/coding/light-the-way-2.md
Normal file
10
docs/coding/light-the-way-2.md
Normal file
@ -0,0 +1,10 @@
|
||||
# Light the way Activity 2
|
||||
|
||||
```blocks
|
||||
sensors.color3.onLightChanged(LightIntensityMode.Ambient, LightCondition.Bright, function () {
|
||||
brick.clearScreen()
|
||||
})
|
||||
sensors.color3.onLightChanged(LightIntensityMode.Ambient, LightCondition.Dark, function () {
|
||||
brick.showImage(images.objectsLightOn)
|
||||
})
|
||||
```
|
13
docs/coding/light-the-way-3.md
Normal file
13
docs/coding/light-the-way-3.md
Normal file
@ -0,0 +1,13 @@
|
||||
# Light the way Activity 3
|
||||
|
||||
```blocks
|
||||
sensors.color3.onLightChanged(LightIntensityMode.Ambient, LightCondition.Bright, function () {
|
||||
brick.clearScreen()
|
||||
})
|
||||
sensors.color3.onLightChanged(LightIntensityMode.Ambient, LightCondition.Dark, function () {
|
||||
brick.showImage(images.objectsLightOn)
|
||||
})
|
||||
sensors.touch1.onEvent(TouchSensorEvent.Pressed, function () {
|
||||
brick.showImage(images.objectsLightOn);
|
||||
})
|
||||
```
|
Reference in New Issue
Block a user