Thursday, 6 October 2016

Micro:bit sings - sort of

Just a short post today on getting the Micro:bit to sing using micropython. The process is covered very well in the Micro:bit-Micropython documentation. This post is just my notes really of what I did.

The goal was to the try and replicate a bit of the intro to Kraftwerk's The Man-Machine (the repeating of Machine)- I came nowhere near it but it was fun trying.

Everything needs to be spelt out in Phonemes, which is a bit of a challenge, but I only had one word to do so that was ok. The Micro:bit-Micropython documentation has a list of the Phonemes allowed, you do need to get them right this was the most common error I found with the code. Pins 0 and 1 had croc-clips connecting them to the first and third parts on a speakers 3.5mm plug (as above) - thank you to Sway Grantham for showing me that.

from microbit import *
import speech

while True:

    speech.sing("MEYSHEYN  ", pitch=90,speed=100)
    speech.sing("MEYSHEYN  ", pitch=70, speed=80)
    speech.sing("MEYSHEYN  ", pitch=60,speed=60)


It is good fun, but develop it away from others, it has the potential to annoy.

It also works with 4Tronix's (thank you for the suggestion) Micro:Bit PlayGround - only one connection needed this time.



All opinions in this blog are the Author's and should not in any way be seen as reflecting the views of any organisation the Author has any association with. Twitter @scottturneruon

No comments:

Post a Comment

Remote Data Logging with V1 Microbit

In an earlier post  https://robotsandphysicalcomputing.blogspot.com/2024/08/microbit-v1-datalogging.html  a single microbit was used to log ...