Skip to content

Instantly share code, notes, and snippets.

@teromakotero
Last active March 1, 2018 10:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save teromakotero/889afc4de84580b88b01015fe7bda117 to your computer and use it in GitHub Desktop.
Save teromakotero/889afc4de84580b88b01015fe7bda117 to your computer and use it in GitHub Desktop.
Making music with micro:bit and Python. El manisero.
import music
# Täältä löytyy ohjeita musiikin koodaamiseen: http://microbit-micropython.readthedocs.io/en/latest/music.html#musical-notation
tune = ["R:4","G4:4","D4:4","E4:4","R:4","F#4:2","E4:4","E4:2","D4:4"]
# tunen sisällä on sävel, joka halutaan micro:bitin soittavan
while True:
# ikuinen silmukka soittaa aiemmin määriteltyä säveltä alla olevan käskyn avulla
music.play(tune)
@teromakotero
Copy link
Author

Added comments in Finnish for educational use.

@teromakotero
Copy link
Author

Changed the link.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment