Before we have the ChickBot racing around the room, let’s give it a little more voice.
In the first activity, we had flashed an LED and played a single note. By using several notes, we can have the ChickBot play a tune. This lesson is as much about learning to duplicate blocks so you can really master the user interface of the Block Editor.
You’ll see the first four notes are duplicated in the second section – try to take advantage of that by seeing what you can duplicate so you don’t have to enter them again. The Block Editor doesn’t have a pre-defined value for one of the notes, a D in the octave above middle C, so we use the frequency value for it – just drag over a number block from the Maths section.
Compile, download and press button A to hear the very well known tune. Maybe it could be used as a badge on special occasions whilst displaying a number.
There is an activity in the Vault on taking sheet music and programming it into a ChickBot, but feel free to play around with various tunes or scales that you may know.