In this chapter, you will learn how to use the Music package of the MakeCode for micro:bit to build and play simple tunes. MakeCode allows you to build music by combining music tones, octaves, beats (duration), accidentals (flats and sharps), and so forth. You can also use the built-in melodies with your applications.
11-1. Connecting a Speaker to Pin 0
Problem
You want to connect a speaker to the micro:bit pin 0.
Solution
Connect one wire to pin0 and the other wire to ground ...