ignition activities
This commit is contained in:
parent
ac0a7b326f
commit
81f406c6cc
@ -109,6 +109,26 @@
|
||||
"description": "Activity 3",
|
||||
"url":"/coding/reverse-beeper-3",
|
||||
"cardType": "example"
|
||||
}
|
||||
]
|
||||
}]
|
||||
```
|
||||
|
||||
## Ignition
|
||||
|
||||
```codecard
|
||||
[{
|
||||
"name": "Ignition",
|
||||
"description": "Activity 1",
|
||||
"url":"/coding/ingition-1",
|
||||
"cardType": "example"
|
||||
}, {
|
||||
"name": "Ignition",
|
||||
"description": "Activity 2",
|
||||
"url":"/coding/ignition-2",
|
||||
"cardType": "example"
|
||||
}, {
|
||||
"name": "Ignition",
|
||||
"description": "Activity 3",
|
||||
"url":"/coding/ignition-3",
|
||||
"cardType": "example"
|
||||
}]
|
||||
```
|
12
docs/coding/ignition-2.md
Normal file
12
docs/coding/ignition-2.md
Normal file
@ -0,0 +1,12 @@
|
||||
# Ignition Activity 2
|
||||
|
||||
```blocks
|
||||
while (true) {
|
||||
if (sensors.touch1.wasPressed() &&
|
||||
sensors.ultrasonic4.distance() < 10) {
|
||||
music.playSoundEffectUntilDone(sounds.mechanicalMotorStart)
|
||||
music.playSoundEffectUntilDone(sounds.mechanicalMotorIdle);
|
||||
}
|
||||
loops.pause(1);
|
||||
}
|
||||
```
|
13
docs/coding/ignition-3.md
Normal file
13
docs/coding/ignition-3.md
Normal file
@ -0,0 +1,13 @@
|
||||
# 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);
|
||||
}
|
||||
loops.pause(1);
|
||||
}
|
||||
```
|
Loading…
Reference in New Issue
Block a user