Example Code for micro:bit-Light and Sound Interactive Cake
Make a birthday cake. When playing the birthday song and the sound sensor detects the sound, and the colorful LED strip lights up.
Hardware Preparation
![]() |
![]() |
![]() |
|---|---|---|
| BOS0009 Sound Sensor | BOS0019 Colorful LED Strip(Fixed color) | BOS0035 Mainboard-3IO |
![]() |
![]() |
|
| MBT0039 micro:bit | BOS0040 micro:bit BOSON Expansion Board |
Software Preparation
Supports graphical programming platforms such as MakeCode, and Mind+.
Wiring Diagram
Non-programming Project
Connection Diagram:

Programming Project
Connection Diagram:

Other Preparation Work
Tip: micro:bit and its expansion board will be used in programming projects.
Result
Video Demo
| Non-programming | Programming |
|---|---|
![]() |
![]() |
Additional Information
Program Flowchart:

Was this article helpful?







