# Case 18: Music Box ## Introduction This is a music box. We can control the buzzer on the micro:bit to emit different melody by pressing the button A on the micro:bit. ## Quick to Start ### Materials Nezha expansion board × 1 micro:bit × 1 ***Tips: You may need to purchase [Nezha Inventor's Kit](https://shop.elecfreaks.com/products/elecfreaks-micro-bit-nezha-48-in-1-inventors-kit-without-micro-bit-board?_pos=2&_sid=ed1b6fbd2&_ss=r) if you want all the above compoents.*** ### Connection Diagram Insert the micro:bit to Nezha expansion board. ![](./images/case_18_03.png) ## MakeCode Programming ### Programme as the picture shows: ![](./images/case_18_15.png) ### Link Link: [https://makecode.microbit.org/_gRoDU7R96LTf](https://makecode.microbit.org/_gRoDU7R96LTf) You may also downoad it directly below:
### Result Press button A to switch the music. ![](./images/case-gif-18.gif)