Skip to content

crwdns342183:0crwdne342183:0

crwdns311974:0crwdne311974:0

crwdns347531:0crwdne347531:0 | MakeCode, Python | crwdns255566:0crwdne255566:0, crwdns255570:0crwdne255570:0 | crwdns258528:0crwdne258528:0, crwdns258566:0crwdne258566:0, crwdns258584:0crwdne258584:0

crwdns255580:0crwdne255580:0

crwdns255582:0crwdne255582:0

crwdns255584:0crwdne255584:0

crwdns255586:0crwdne255586:0

crwdns255588:0crwdne255588:0

  • crwdns255590:0crwdne255590:0
  • crwdns255592:0crwdne255592:0
  • crwdns255594:0crwdne255594:0 crwdns255596:0crwdne255596:0

crwdns255598:0crwdne255598:0

  • crwdns255600:0crwdne255600:0
  • crwdns255602:0crwdne255602:0
  • crwdns255604:0crwdne255604:0

crwdns255606:0crwdne255606:0

1from microbit import *
2
3while True:
4    if button_a.is_pressed():
5        for x in range(4):
6            display.show(Image.HAPPY)
7            sleep(200)
8            display.clear()
9            sleep(200)
10    if button_b.is_pressed():
11        for x in range(4):
12            display.show(Image.SAD)
13            sleep(200)
14            display.clear()
15            sleep(200)

crwdns255608:0crwdne255608:0

  • crwdns255610:0crwdne255610:0
  • crwdns255612:0crwdne255612:0
  • crwdns255614:0crwdne255614:0
  • crwdns255616:0crwdne255616:0