Skip to content

crwdns342183:0crwdne342183:0

crwdns312568:0crwdne312568:0

crwdns347531:0crwdne347531:0 | MakeCode, Python | crwdns255566:0crwdne255566:0, crwdns255570:0crwdne255570:0, crwdns274472:0crwdne274472:0, crwdns274476:0crwdne274476:0 | crwdns258566:0crwdne258566:0, crwdns258616:0crwdne258616:0

crwdns275560:0crwdne275560:0

crwdns275562:0crwdne275562:0

crwdns275564:0crwdne275564:0

crwdns275566:0crwdne275566:0

crwdns275568:0crwdne275568:0

crwdns275570:0crwdne275570:0

  • crwdns275572:0crwdne275572:0

crwdns275574:0crwdne275574:0

  • crwdns275576:0crwdne275576:0 crwdns275578:0crwdne275578:0
  • crwdns275580:0crwdne275580:0
  • crwdns275582:0crwdne275582:0

crwdns275584:0crwdne275584:0

  • crwdns275586:0crwdne275586:0
  • crwdns275588:0crwdne275588:0
  • crwdns275590:0crwdne275590:0

crwdns275592:0crwdne275592:0

1from microbit import *
2import audio
3
4while True:
5    if button_a.is_pressed():
6        display.show(Image.HAPPY)
7        audio.play(Sound.HAPPY)
8    if button_b.is_pressed():
9        display.show(Image.SAD)
10        audio.play(Sound.SAD)
11    if pin_logo.is_touched():
12        display.show(Image.SURPRISED)
13        audio.play(Sound.SPRING)

crwdns275594:0crwdne275594:0

  • crwdns275596:0crwdne275596:0
  • crwdns275598:0crwdne275598:0
  • crwdns275600:0crwdne275600:0