crwdns257780:0crwdne257780:0
crwdns257782:0crwdne257782:0
crwdns257784:0crwdne257784:0
crwdns336803:0crwdne336803:0
crwdns336805:0crwdne336805:0
crwdns336807:0crwdne336807:0
crwdns336809:0crwdne336809:0
- crwdns336811:0crwdne336811:0
- crwdns336813:0crwdne336813:0 crwdns336815:0crwdne336815:0
- crwdns336817:0crwdne336817:0 crwdns336819:0crwdne336819:0
- crwdns336823:0crwdne336823:0
- crwdns336825:0crwdne336825:0 crwdns336827:0crwdne336827:0
crwdns336829:0crwdne336829:0
- crwdns355714:0crwdne355714:0
- crwdns355716:0crwdne355716:0
- crwdns336835:0crwdne336835:0
- crwdns355718:0crwdne355718:0
crwdns336839:0crwdne336839:0
1from microbit import *
2import radio
3import music
4radio.config(group=1)
5radio.on()
6
7def alarm():
8 display.show(Image.ANGRY)
9 music.play(music.BADDY)
10
11while True:
12 message = radio.receive()
13 if message:
14 alarm()
15 if accelerometer.was_gesture('shake'):
16 radio.send('thief!')
17 alarm()
18
crwdns336841:0crwdne336841:0
- crwdns336843:0crwdne336843:0 crwdns336845:0crwdne336845:0
- crwdns336847:0crwdne336847:0
- crwdns336849:0crwdne336849:0
- crwdns336851:0crwdne336851:0
This content is published under a Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) licence.