Skip to content

crwdns342183:0crwdne342183:0

crwdns312410:0crwdne312410:0

crwdns347531:0crwdne347531:0 | MakeCode, Python | crwdns255578:0crwdne255578:0 | crwdns258616:0crwdne258616:0

crwdns257438:0crwdne257438:0

crwdns257440:0crwdne257440:0

crwdns257442:0crwdne257442:0

crwdns257444:0crwdne257444:0

crwdns257446:0crwdne257446:0

  • crwdns257448:0crwdne257448:0
  • crwdns257450:0crwdne257450:0
  • crwdns257452:0crwdne257452:0
  • crwdns257454:0crwdne257454:0

crwdns257456:0crwdne257456:0

  • crwdns257458:0crwdne257458:0
  • crwdns257460:0crwdne257460:0
  • crwdns257462:0crwdne257462:0
  • crwdns257464:0crwdne257464:0

crwdns257466:0crwdne257466:0

1from microbit import *
2
3while True:
4    if button_a.is_pressed():
5        display.show(Image.HAPPY)
6    if button_b.is_pressed():
7        display.show(Image.SAD)
8    if accelerometer.was_gesture('shake'):
9        display.show(Image.SILLY)

crwdns257468:0crwdne257468:0

  • crwdns257470:0crwdne257470:0
  • crwdns257472:0crwdne257472:0
  • crwdns257474:0crwdne257474:0
  • crwdns257476:0crwdne257476:0 crwdns257478:0crwdne257478:0