BBC microbit Lessons for Micro Python
microbit Lessons Overview:
This is a set of BBC microbit lessons I developed using Micro Python. It features six lessons in the form of PowerPoint workbooks.
You can either use the Python editor on the micro:bit website or you can download the offline Mu editor. The advantage of this is it can write files directly to the micro:bit, they don’t have to be downloaded and copied manually.
The Mu editor can be downloaded here.
Equipment Required:
- BBC micro:bit
- Micro USB cable
- Crocodile clips
Love this – totally newbie -can you PLEASE tell me what I’m doing wrong in the music lesson-(no error but yet no sound)
from microbit import *
import music
sound1 = [“C4:4”, “C4:4”, “G4:4”, “G4:4”, “A4:4”, “A4:4”, “G4:4”]
sound2 = [“F4:4”, “F4:4”, “E4:4”, “E4:4”, “D4:4”, “D4:4”, “C4:4”]
sound3 = [“G4:4”, “G4:4”, “F4:4”, “F4:4”, “E4:4”, “E4:4”, “D4:4”]
tune = [sound1, sound2, sound3, sound3, sound1, sound2]
music.play(tune)
Sadly you can’t play a list of custom melodies, however you could use a for loop to play each one in term. For example:
for sound in tune:
music.play(sound)