Maker.io main logo

Mai-Z’s Haunted Harmony: A micro:bit Halloween Choir

2026-10-22 | By Kitronik Maker

Share

License: See Original Project Speakers Displays LED Matrix Microcontrollers Environmental Light Line Follower Movement Encoder Proximity Ultrasonic micro:bit

Courtesy of Kitronik Maker

Guide by Kitronik Maker

Mai-Z the MouseBot, our newest robot, loves to get a little spooky! We’ve made two cute Mai-Z sized masks and coded up three micro:bits to have them sing together when the A button is pressed on a remote micro:bit.

Read on to find out firstly how Emma made the masks, and secondly how to code the music onto the micro:bits!

What did we use?

Step 1: Cut out the masks

Using the files above, cut out the masks. Either use the DXF for a CAD option, or use the PDF and print it out to use as a stencil.

cut_out_1

Step 2: Tie the masks to the Mai-Zs

Using string, twine, yarn, ribbon, or something similar, use the holes in the sides of the masks to tie them around the Mai-Zs – like you would with a normal mask.

masks_2

Coding the Choir

We will be coding three micro:bits in order to make the choir. Two will sing and control the LEDs on the Mai-Zs, and one will be a remote control that will start both the others singing at once when the A button is pressed.

What did we use?

micro:bit 1 – The Remote Control

To begin, we will be putting an incredibly simple piece of code on the micro:bit we’re using as the remote control. This will simply use the radio to send the number 1, when button A is pressed.

Additionally, we have set the LEDs to show an animated heart symbol, just to indicate that the micro:bit is powered when we plug in the battery pack.

code_3

code_4

Microsoft MakeCode | Terms of Use | Privacy | Download

micro:bit 2 – The Violin Lead

When plugged into one of the Mai-Zs, this micro:bit will play the melody when it receives via radio the number 1 from the remote-control micro:bit, and it will also control the orange LEDs to flicker like candles.

The code begins with an if statement, setting the variable for the violin lead to true if this micro:bit receives the number 1 from the remote-control micro:bit.

code_5

Then after this, inside a forever block, set the volume, tempo, and then define the variable by sequencing the song using the music blocks inside an if statement. At the end of the song, make sure to set the variable to false so that the music stops playing.

code_6

Lastly, we’re making the LEDs flicker orange like candles.

import_7

In order to import the custom Mai-Z blocks, press the “Extensions” tab in the code editor, type “Mai-Z” into the search bar, and click on the “kitronik-mai-z” extension.

Using the custom Mai-Z blocks, vary the LED brightness, and pause for different amounts of time in between.

code_8

code_9

Microsoft MakeCode | Terms of Use | Privacy | Download

micro:bit 3 – The Accompaniment

When plugged into one of the Mai-Zs, this micro:bit will play the accompaniment upon receiving the number 1 from the remote-control micro:bit, and will also make the LEDs flicker orange.

The code begins with the same if statement, setting the variable for the chords to true if this micro:bit receives the number 1 from the remote-control micro:bit.

code_10

Then, in the same way we did for the melody, we define the variable in a forever block and set the volume and tempo.

code_11

Finally, a slightly altered flickering candle sequence is included.

code_12

code_13

Microsoft MakeCode | Terms of Use | Privacy | Download

Mfr Part # 56130
KITRONIK MAI-Z THE MOUSEBOT FOR
Kitronik Ltd.
Mfr Part # MICRO:BIT SINGLE
BBC MICRO-BIT V2 SBC BOARD ONLY
Micro:bit
Mfr Part # 2271
BATTERY HOLDER AAA 2 CELL LEADS
Kitronik Ltd.
Add all DigiKey Parts to Cart
Have questions or comments? Continue the conversation on TechForum, DigiKey's online community and technical resource.