crwdns342123:0crwdne342123:0
crwdns342125:0crwdne342125:0
crwdns342127:0crwdne342127:0
crwdns342133:0crwdne342133:0
- crwdns342135:0crwdne342135:0 crwdns342137:0crwdne342137:0
- crwdns342139:0crwdne342139:0
- crwdns342141:0crwdne342141:0
- crwdns342143:0crwdne342143:0 crwdns342145:0crwdne342145:0 crwdns342147:0crwdne342147:0
crwdns342149:0crwdne342149:0
- crwdns342151:0crwdne342151:0
- crwdns342153:0crwdne342153:0 crwdns342155:0crwdne342155:0
- crwdns342157:0crwdne342157:0 crwdns342159:0crwdne342159:0
crwdns342161:0crwdne342161:0
- crwdns342163:0crwdne342163:0
- crwdns342165:0crwdne342165:0
- crwdns342167:0crwdne342167:0
- crwdns342169:0crwdne342169:0
crwdns342171:0crwdne342171:0
crwdns342173:0crwdne342173:0
1from microbit import *
2import radio
3radio.config(group=17)
4radio.on()
5
6while True:
7 if button_a.was_pressed():
8 display.scroll(compass.get_field_strength())
9 if compass.get_field_strength() < 100000:
10 display.show(Image.DIAMOND_SMALL)
11 radio.send('open')
12 else:
13 display.clear()
14 radio.send('closed')
15 sleep(2000)
16
crwdns342175:0crwdne342175:0
crwdns342177:0crwdne342177:0
- crwdns342179:0crwdne342179:0
- crwdns342181:0crwdne342181:0
This content is published under a Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) licence.