pxt-ev3/docs/coding/reverse-beeper-1.md

12 lines
271 B
Markdown
Raw Normal View History

2018-01-06 06:20:00 +01:00
# Reverse Beeper Activity 1
```blocks
loops.forever(function () {
music.playTone(440, sensors.ultrasonic4.distance());
loops.pause(50)
})
motors.largeBC.setSpeed(-20);
sensors.ultrasonic4.pauseUntil(UltrasonicSensorEvent.ObjectNear);
motors.stopAllMotors();
```