Skip to content

crwdns342183:0crwdne342183:0

crwdns340065:0crwdne340065:0

crwdns347529:0crwdne347529:0 | MakeCode, Python | crwdns255558:0crwdne255558:0, crwdns255560:0crwdne255560:0, crwdns255566:0crwdne255566:0, crwdns255572:0crwdne255572:0 | crwdns258488:0crwdne258488:0, crwdns258502:0crwdne258502:0, crwdns258504:0crwdne258504:0, crwdns258538:0crwdne258538:0, crwdns258554:0crwdne258554:0, crwdns258582:0crwdne258582:0, crwdns258584:0crwdne258584:0

crwdns340071:0crwdne340071:0

crwdns340073:0crwdne340073:0

crwdns340075:0crwdne340075:0

crwdns347523:0crwdne347523:0

crwdns340079:0crwdne340079:0

  • crwdns340081:0crwdne340081:0
  • crwdns340083:0crwdne340083:0 crwdns340085:0crwdne340085:0 crwdns340087:0crwdne340087:0
  • crwdns340089:0crwdne340089:0
  • crwdns340091:0crwdne340091:0 crwdns340093:0crwdne340093:0
  • crwdns340095:0crwdne340095:0

crwdns340097:0crwdne340097:0

  • crwdns340099:0crwdne340099:0
  • crwdns340101:0crwdne340101:0
  • crwdns340103:0crwdne340103:0

crwdns340105:0crwdne340105:0

crwdns340107:0crwdne340107:0

1from microbit import *
2import radio
3radio.config(group=5)
4radio.on()
5
6while True:
7    if button_a.was_pressed():
8        display.scroll(display.read_light_level())
9    if display.read_light_level() > 50:
10        radio.send('lights on')
11    else:
12        radio.send('lights off')
13    sleep(10000)
14

crwdns340109:0crwdne340109:0

1from microbit import *
2import music
3import radio
4radio.config(group=5)
5radio.on()
6
7while True:
8    message = radio.receive()
9    if message:
10        if message == 'lights off':
11            display.clear()
12        elif message == 'lights on':
13            display.show(Image.ANGRY)
14            music.play(music.BADDY)
15

crwdns340111:0crwdne340111:0

  • crwdns340113:0crwdne340113:0
  • crwdns340115:0crwdne340115:0
  • crwdns340117:0crwdne340117:0