pxt-ev3/docs/maker/security-gadget.md

9 lines
247 B
Markdown
Raw Permalink Normal View History

2017-10-27 08:58:34 +02:00
# Security Gadget
This program will activate an alarm when an object is lifted from the Touch Sensor.
```blocks
input.touchSensor1.onEvent(TouchSensorEvent.Released, function () {
music.playSoundUntilDone(music.sounds(Sounds.PowerUp))
})
```