2018-01-06 06:40:11 +01:00
|
|
|
# Ignition Activity 3
|
|
|
|
|
|
|
|
```blocks
|
|
|
|
while (true) {
|
|
|
|
if (sensors.ultrasonic4.distance() < 10 &&
|
|
|
|
sensors.touch1.wasPressed() &&
|
|
|
|
brick.buttonEnter.wasPressed()) {
|
|
|
|
music.playSoundEffectUntilDone(sounds.mechanicalMotorStart)
|
|
|
|
music.playSoundEffectUntilDone(sounds.mechanicalMotorIdle);
|
|
|
|
}
|
2018-02-15 01:05:31 +01:00
|
|
|
pause(1);
|
2018-01-06 06:40:11 +01:00
|
|
|
}
|
|
|
|
```
|