The Micro:bit Accelerometer Tone Adjuster. (Image: ME)

 

This project takes the Micro:bit and lets it change tones as you move it around, using the onboard accelerometer as the variable input. This is sort of like the light Theremins I made in these two projects: basic and advanced.

This time, I just have to use the Micro:bit itself. I also wanted to put the Microbit into something I could hold and move around. Additionally, I wanted to use an amplified speaker.

 

The software works as follows:

- Power it up, it ready to play tones/music. Press the A button on the Micro:bit to start playing tones. It will play as long as you hold the button down.

- Move the Micro:bit around to hear the sounds.

- Press “B” to change the tone types. Repeat moving it around.

 

 

First, let’s gather all the necessary components you’ll need to build this project.

1x BBC Micro:bit

1x 3.5mm Audio Jack

1x 5v 2A power supply

 

Optional:

Laser cutter to cut the case

 

Video demonstration of the project:

 

 

STEP 1

Load the code onto the Micro:bit.

I am providing the hex file you need to drag and drop onto the Micro:bit, and the python code as two separate files. For the below process, just use the hex file.

Plug the MicroUSB cable into the Micro:bit, and plug the other end of the cable to a PC or MAC.

At this point, you are going to copy over the code to the Micro:bit. I am providing the program (code) in this post that needs to be copied over. When the Micro:bit plugs into a computer, it shows up as a USB flash drive. All you have to do is copy the file over to the Micro:bit, like it’s a USB Flash Drive, and the Micro:bit will reset, and the program is active.

You can remove the Micro:bit from the computer at this point. The program will start running, and without the rest of the circuit, it will not function.

A little bit about the code:

 

STEP 2

I like this project a lot, since it doesn’t have a lot of steps and parts. Following is the only wiring you have to do.

 

Wire up the audio connector.

 

STEP 3

Optional:

Glue the Micro:bit into the laser cut piece.

 

STEP 4

Setup

Plug USB 5V power to the Micro:bit.

After this, it will be on and ready to play tones.

- Press the A button on the Micro:bit to start playing tones. It will play as long as you hold the button down.

- Move the Micro:bit around to hear the sounds.

- Press “B” to change the tone types. Repeat moving it around.

 

Conclusion:

There is a lot of functionality in simple build. All you need is a speaker and a Micro:bit.