19. Case 18: Music Box

19.1. Introduction

Build a music box with the micro:bit.

19.2. Quick to Start


Materials


Nezha expansion board × 1

micro:bit × 1

Connection Diagram


  • Insert the micro:bit to Nezha expansion board.

../../_images/case_18_03.png

19.3. MakeCode Programming


Programme as the picture shows:

../../_images/case_18_15.png

Result

  • Press button A to switch the music.