Skip to content

crwdns342183:0crwdne342183:0

crwdns312478:0crwdne312478:0

crwdns347529:0crwdne347529:0 | MakeCode, Python | crwdns255558:0crwdne255558:0, crwdns255578:0crwdne255578:0 | crwdns258492:0crwdne258492:0, crwdns258502:0crwdne258502:0, crwdns258554:0crwdne258554:0, crwdns258564:0crwdne258564:0

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