Skip to content

crwdns342183:0crwdne342183:0

crwdns312486:0crwdne312486:0

crwdns347531:0crwdne347531:0 | MakeCode, Python | crwdns255566:0crwdne255566:0, crwdns255570:0crwdne255570:0, crwdns255578:0crwdne255578:0 | crwdns258472:0crwdne258472:0, crwdns258502:0crwdne258502:0, crwdns258516:0crwdne258516:0, crwdns258600:0crwdne258600:0, crwdns293292:0crwdne293292:0, crwdns293306:0crwdne293306:0

crwdns257842:0crwdne257842:0

crwdns257844:0crwdne257844:0

crwdns257846:0crwdne257846:0

crwdns257848:0crwdne257848:0

crwdns257850:0crwdne257850:0

  • crwdns257852:0crwdne257852:0
  • crwdns257854:0crwdne257854:0 crwdns257856:0crwdne257856:0
  • crwdns257858:0crwdne257858:0

crwdns257860:0crwdne257860:0

  • crwdns257862:0crwdne257862:0
  • crwdns257864:0crwdne257864:0
  • crwdns257866:0crwdne257866:0
  • crwdns257868:0crwdne257868:0

crwdns257870:0crwdne257870:0

1from microbit import *
2steps=0
3
4while True:
5    if accelerometer.was_gesture('shake'):
6        steps += 1
7    if button_a.is_pressed():
8        display.scroll(steps)

crwdns257872:0crwdne257872:0

  • crwdns257874:0crwdne257874:0
  • crwdns257876:0crwdne257876:0
  • crwdns257878:0crwdne257878:0