Microbit: Toss a Coin to Your Witcher

by Kiano_C in Circuits > Microcontrollers

366 Views, 1 Favorites, 0 Comments

Microbit: Toss a Coin to Your Witcher

imgly_348299600847550049.jpg
7722335_0.png
Piano Keys labeled.PNG

When I learned that about Microbit I was already thinking about everything that I could do. But for my first project I wanted to start of simple, that's when I learned the music feature. The microbit can make music but I quickly learned that the code for it can become really long, yet stay simple.

Supplies

You will only need some microbit starterpacks for this project (mainly for the little speakers) but I recommend getting the following to make the coding easier.

An image that gives the number of the piano keys (you can see the image above)

(You can always make your own image with paint paired with a photo edit

A pdf file for the exact hertz of a given piano key. (the link is right under here)

https://www.ece.iastate.edu/~alexs/classes/2016_Sp...

And that's about it.

Step 1: How to Begin

Making a melody on microbit is very easy. The easiest way I found was to get a piano video about the melody that I want to recreate, I used one of the popular song "toss a coin to your witcher" of the netflix series "the witcher".

Now it is as easy as following the video note for the note.

To make things easier you can use the image of the numbered piano keys to look for the rights hertz of that particular key with the pdf file.

I will admit that this is a slow proces but it's the simplest way to do this.

if you need more guidance on how to use the music and radio feature, follow the next few steps.

Step 2: Music

Melody.PNG

The music feature can be found on the left side, the third feature.

This is very simple to use, the main pieces that we are going to use are the "play tune ... for ... beat" and "pause ... beat". By uing the hertz pdf we know which key has which hertz, so to play that note you just need to put the number of hertz in the "play tune" section. When there is a gap where there are no note playing you use the "pause" box for however long you like.

Piece of cake.

Step 3: Radio

radio groep en verzend nummer.PNG
receive number.PNG

Communication is harder than music but still easy to understand. When you want to communicate with another microbit you will need to set those microbits to the same group via the group box. when that is done you need to have one of the microbits send a number or string to the other microbit, this will tell the second microbit to do the command/music that you have set for it.

And that is how you do it. Hopefully I was of help.

Have fun making your beautiful melody!