--- /dev/null
+*.py[cod]
+
+# C extensions
+*.so
+
+# Packages
+*.egg
+*.egg-info
+dist
+build
+eggs
+parts
+bin
+var
+sdist
+develop-eggs
+.installed.cfg
+lib
+lib64
+__pycache__
+
+# Installer logs
+pip-log.txt
+
+# Unit test / coverage reports
+.coverage
+.tox
+nosetests.xml
+
+# Translations
+*.mo
+
+# Mr Developer
+.mr.developer.cfg
+.project
+.pydevproject
+
+# IPython
+.ipynb*
+
+# Sublime text
+*.sublime-workspace
+
+# Logs
+*.log
+
+# Databases
+*sqlite3
+
+# Virtual environment
+djangogirls
+
+# Django static files
+/static
+.DS_Store
--- /dev/null
+from microbit import *
+import radio
+
+A_IMAGE = Image('00009:'
+ '09990:'
+ '90090:'
+ '90090:'
+ '09999')
+
+B_IMAGE = Image('90009:'
+ '90000:'
+ '99900:'
+ '90090:'
+ '99900')
+
+radio.on()
+
+display.scroll('Ready', wait=False, loop=True)
+last_receive_time = None
+display_image = None
+
+while True:
+ message = radio.receive()
+ if message:
+ last_receive_time = running_time()
+ if message == 'a':
+ display_image = A_IMAGE
+ if message == 'b':
+ display_image = B_IMAGE
+ elif last_receive_time:
+ dimness = (running_time() - last_receive_time) / 500
+ if dimness > 9: dimness = 9
+ display.show(display_image / dimness , wait=False)
--- /dev/null
+from microbit import *
+import radio
+
+A_IMAGE = Image('09909:'
+ '90090:'
+ '99990:'
+ '90090:'
+ '90090')
+
+B_IMAGE = Image('99909:'
+ '90090:'
+ '99900:'
+ '90090:'
+ '99900')
+
+display.scroll('Press', wait=False, loop=True)
+last_sent_time = None
+
+while True:
+ if button_a.was_pressed():
+ display_image = A_IMAGE
+ last_sent_time = running_time()
+ radio.on()
+ radio.send('a')
+ radio.off()
+ if button_b.was_pressed():
+ display_image = B_IMAGE
+ last_sent_time = running_time()
+ radio.on()
+ radio.send('b')
+ radio.off()
+ if last_sent_time:
+ dimness = (running_time() - last_sent_time) / 500
+ if dimness > 9: dimness = 9
+ display.show(display_image / dimness, wait=False)
+
\ No newline at end of file