Skip to content

crwdns342183:0crwdne342183:0

crwdns316768:0crwdne316768:0

crwdns347531:0crwdne347531:0 | MakeCode, Python | crwdns255566:0crwdne255566:0, crwdns274474:0crwdne274474:0 | crwdns258500:0crwdne258500:0, crwdns258502:0crwdne258502:0, crwdns258504:0crwdne258504:0

crwdns277474:0crwdne277474:0

crwdns277476:0crwdne277476:0

crwdns277478:0crwdne277478:0

crwdns277480:0crwdne277480:0

crwdns277482:0crwdne277482:0

crwdns277484:0crwdne277484:0

  • crwdns277486:0crwdne277486:0
  • crwdns277488:0crwdne277488:0

crwdns277490:0crwdne277490:0

  • crwdns277676:0crwdne277676:0 crwdns277494:0crwdne277494:0 crwdns277496:0crwdne277496:0
  • crwdns277498:0crwdne277498:0
  • crwdns277678:0crwdne277678:0
  • crwdns277680:0crwdne277680:0

crwdns277504:0crwdne277504:0

  • crwdns277506:0crwdne277506:0
  • crwdns277508:0crwdne277508:0
  • crwdns277510:0crwdne277510:0

crwdns277512:0crwdne277512:0

1from microbit import *
2lightsOn = False
3
4while True:
5    if microphone.was_event(SoundEvent.LOUD):
6        lightsOn = not lightsOn
7        if lightsOn:
8            display.show(Image('99999:'
9                               '99999:'
10                               '99999:'
11                               '99999:'
12                               '99999'))
13        else:
14            display.clear()
15    sleep(100)

crwdns277514:0crwdne277514:0

  • crwdns277516:0crwdne277516:0 crwdns277518:0crwdne277518:0 crwdns277520:0crwdne277520:0
  • crwdns277522:0crwdne277522:0
  • crwdns277524:0crwdne277524:0
  • crwdns277526:0crwdne277526:0