Valentine Musical Box: an Interactive Micro:bit Project

by solisd in Circuits > Microcontrollers

149 Views, 0 Favorites, 0 Comments

Valentine Musical Box: an Interactive Micro:bit Project

Actual Box closed.png

I created the Valentine Musical Box as an interactive physical-computing project using a micro:bit V2. My original idea was to build a small micro:bit-controlled car, but I did not have all the electronic components I needed. When I found a Valentine gift box among my craft materials, I decided to repurpose it and create a musical box instead.

The finished project uses Button A as the input. When the button is pressed, the micro:bit displays a heart on its 5Γ—5 LED display, plays an original 24-note Valentine melody arranged as three 8-note sequences through its built-in speaker, and then clears the display.

The project went through several iterations. I experimented with the accelerometer, and later the light sensor, before testing showed that Button A provided the most reliable interaction. This Instructable documents the design, programming, testing, revisions, and final prototype.

Supplies

micro:bit V2, 3V battery pack/AAA batteries, Valentine box, USB cable, computer with MakeCode, and mounting material.

Design, Programming & Iteration

MakeCode_Screenshot.png

I tested the accelerometer and light sensor before selecting Button A as the most reliable input. The final program displays a heart, plays three 8-note melody sequences, and clears the display. My complete design brief, original sketch, programming plan, testing/iteration log, and reflection are included in the Valentine Musical Box PDF documentation attached in the Introduction section.

Final Prototype & How to Use

ValentineMusicalBox_Micro-bit Project.jpg

Open the Valentine Musical Box and press Button A. The micro:bit displays a heart, plays the three-part Valentine melody through its built-in speaker, and clears the display when finished. A 3V battery pack inside the box powers the micro: bit.

Final Demonstration & Reflection

This video demonstrates my completed Valentine Musical Box in action. The micro:bit V2 is mounted inside the Valentine box and powered by a 3V battery pack. Button A serves as the input. When pressed, the micro:bit displays a heart on its 5Γ—5 LED display, plays my three-part 24-note Valentine melody through the built-in speaker, and then clears the display. This final version resulted from several rounds of testing and iteration to determine the most reliable input for the project.

Personal Reflection: My complete 250–400 word reflection, including the design process, iteration and debugging, external materials, challenges, final solution, and comparison with Python programming, is included in the Valentine Musical Box PDF documentation.