pxt-ev3/docs/coding/ignition-1.md

12 lines
300 B
Markdown
Raw Normal View History

2018-01-06 06:29:52 +01:00
# Ignition Activity 1
```blocks
sensors.touch1.onEvent(ButtonEvent.Pressed, function () {
2018-01-06 06:29:52 +01:00
brick.showImage(images.eyesDizzy)
})
sensors.ultrasonic4.onEvent(UltrasonicSensorEvent.ObjectDetected, function () {
brick.showImage(images.eyesTiredMiddle)
})
brick.showImage(images.eyesSleeping)
```