pxt-ev3/docs/maker/movement-detector.md
2018-04-11 10:31:53 -06:00

269 B

Movement Detector

This program will activate an alarm when an object moves in front of the Ultrasonic Sensor.

sensors.ultrasonic4.onEvent(UltrasonicSensorEvent.ObjectNear, function () {
    music.playSoundEffectUntilDone(sounds.informationActivate)
})