crwdns256112:0crwdne256112:0
crwdns256114:0crwdne256114:0
crwdns256116:0crwdne256116:0
crwdns259518:0crwdne259518:0
crwdns274124:0crwdne274124:0
crwdns274126:0crwdne274126:0
crwdns259524:0crwdne259524:0
- crwdns259526:0crwdne259526:0
- crwdns259528:0crwdne259528:0
- crwdns259530:0crwdne259530:0
- crwdns259532:0crwdne259532:0
- crwdns259534:0crwdne259534:0
crwdns259536:0crwdne259536:0
- crwdns259538:0crwdne259538:0
- crwdns259540:0crwdne259540:0
- crwdns259542:0crwdne259542:0
crwdns259544:0crwdne259544:0
1from microbit import *
2
3count = 0
4display.show(count)
5
6while True:
7 if button_a.is_pressed() and button_b.is_pressed():
8 count = 0
9 display.scroll(count)
10 elif button_b.is_pressed():
11 count += 1
12 display.scroll(count)
13 elif button_a.is_pressed():
14 display.scroll(count)
15 sleep(100)
crwdns259546:0crwdne259546:0
- crwdns259548:0crwdne259548:0
- crwdns259550:0crwdne259550:0
- crwdns259552:0crwdne259552:0
- crwdns259554:0crwdne259554:0
This content is published under a Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) licence.