Skip to content

crwdns342183:0crwdne342183:0

crwdns340001:0crwdne340001:0

crwdns347529:0crwdne347529:0 | MakeCode, Python | crwdns255562:0crwdne255562:0, crwdns255572:0crwdne255572:0 | crwdns258480:0crwdne258480:0, crwdns258516:0crwdne258516:0, crwdns258540:0crwdne258540:0, crwdns258552:0crwdne258552:0, crwdns258560:0crwdne258560:0, crwdns258618:0crwdne258618:0, crwdns293294:0crwdne293294:0, crwdns293306:0crwdne293306:0

crwdns339955:0crwdne339955:0

crwdns339957:0crwdne339957:0

crwdns339959:0crwdne339959:0

crwdns347503:0crwdne347503:0

crwdns339963:0crwdne339963:0

  • crwdns339965:0crwdne339965:0
  • crwdns339967:0crwdne339967:0
  • crwdns339969:0crwdne339969:0
  • crwdns339971:0crwdne339971:0
  • crwdns339973:0crwdne339973:0 crwdns339975:0crwdne339975:0
  • crwdns339977:0crwdne339977:0

crwdns339979:0crwdne339979:0

  • crwdns339981:0crwdne339981:0
  • crwdns339983:0crwdne339983:0
  • crwdns339985:0crwdne339985:0
  • crwdns339987:0crwdne339987:0

crwdns339989:0crwdne339989:0

1from microbit import *
2import music
3F = 349
4A = 440
5C = 523
6E = 659
7
8while True:
9    if pin1.is_touched():
10        music.pitch(int(F), 500)
11        music.pitch(int(A), 500)
12        music.pitch(int(C), 500)
13    if pin2.is_touched():
14        music.pitch(int(A), 500)
15        music.pitch(int(C), 500)
16        music.pitch(int(E), 500)
17    if button_a.was_pressed():
18        F = F / 2
19        A = A / 2
20        C = C / 2
21        E = E / 2
22    if button_b.was_pressed():
23        F = F * 2
24        A = A * 2
25        C = C * 2
26        E = E * 2
27        

crwdns339991:0crwdne339991:0

  • crwdns339993:0crwdne339993:0
  • crwdns339995:0crwdne339995:0 crwdns339997:0crwdne339997:0
  • crwdns339999:0crwdne339999:0