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

9 lines
247 B
Markdown
Raw Normal View History

2017-10-26 23:58:34 -07: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))
})
```