Skip to content

crwdns342183:0crwdne342183:0

crwdns312012:0crwdne312012:0

crwdns347531:0crwdne347531:0 | MakeCode, Python | crwdns255566:0crwdne255566:0, crwdns255570:0crwdne255570:0, crwdns255572:0crwdne255572:0 | crwdns258584:0crwdne258584:0, crwdns259568:0crwdne259568:0

crwdns277280:0crwdne277280:0

crwdns277282:0crwdne277282:0

crwdns277284:0crwdne277284:0

crwdns277286:0crwdne277286:0

crwdns277288:0crwdne277288:0

crwdns277290:0crwdne277290:0

  • crwdns277292:0crwdne277292:0
  • crwdns277294:0crwdne277294:0

crwdns277296:0crwdne277296:0

  • crwdns277298:0crwdne277298:0 crwdns277300:0crwdne277300:0
  • crwdns277302:0crwdne277302:0
  • crwdns277304:0crwdne277304:0
  • crwdns277306:0crwdne277306:0
  • crwdns277308:0crwdne277308:0
  • crwdns277310:0crwdne277310:0

crwdns277312:0crwdne277312:0

  • crwdns277314:0crwdne277314:0
  • crwdns277316:0crwdne277316:0
  • crwdns277318:0crwdne277318:0

crwdns277320:0crwdne277320:0

1from microbit import *
2import music
3tempo = 100
4
5while True:
6    music.set_tempo(bpm=tempo)
7    music.play(['C4:1', 'r:3']) # play C for 1 tick, rest for 3 ticks
8    if button_a.was_pressed():
9        tempo -= 5
10    if button_b.was_pressed():
11        tempo += 5  
12    

crwdns277322:0crwdne277322:0

  • crwdns277324:0crwdne277324:0
  • crwdns277326:0crwdne277326:0
  • crwdns277328:0crwdne277328:0
  • crwdns277330:0crwdne277330:0
crwdns277656:0crwdne277656:0