Predict the sound
Answers are for parents and teachers.
1
Write three inputs and three outputs that a micro:bit can have.
Inputs: pressing button A, pressing button B, shaking. Outputs: lights, an icon, a word, a sound. (Any three of each.)
2
A program says: when button B is pressed, play sound happy until done, then set volume (255). Is the happy sound very loud? Explain.
No. The sound plays first, at the volume the board already had. The set volume block comes after the sound, so it is too late to change it.
3
Write a short algorithm for a “pet box”: pressing A shows a duck and plays a giggle sound, and pressing B shows a rabbit and plays a yawn sound.
Two short algorithms. For example: Start when button A is pressed, show icon duck, play sound giggle until done. Start when button B is pressed, show icon rabbit, play sound yawn until done.
4
Change Algorithm 1 so the word comes before the house and the sound is as loud as it can be. Write the new algorithm.
1 Start when button A is pressed. 2 Show string “Hi”. 3 Show icon house. 4 Set volume to 255. 5 Play sound twinkle until done. (The volume line must still come before the sound.)
5
(if you have a computer or tablet) With a grown-up, open a micro:bit simulator and press button A on a program that shows an icon. What changes on the lights?
The lights show the icon after button A is pressed.