Last summer I created some resources to use with Micro:bit/s for CPC and over the next few months and I will try and share the best bits with the kind permission of CPC.
This one uses Micropython and a neopixel again. The neopixel is from this kit:
The picture below shows how the Micro:bit is set up, This time it uses the radio module to light up an neo-pixel on another Micro:bit, after one of the buttons is pressed.
You will need to code the Micro:bit with MU either on a PC/ MAC or Linux machine. At the time of writing the BBC website will not allow the radio module to work.
This program uses the radio on the Micro:bit to send messages to trigger neo-pixels on other Micro:bits. The radio code here is taken from the demo by N Toll on the Micro:bit read the docs website.
You will need at least two Micro:bits in order to see it working, both Micro:bits will need the same code loaded onto each one.
Code to go on each Micro:bit:
from microbit import *
np = neopixel.NeoPixel(pin0,1)
#from microbit import display, Image, button_a, sleep
#np = neopixel.NeoPixel(pin0,1)
np = (255,0,0)#Red
np = (0,255,0)#Green
np = (255,69,0)#Yellow
FeelingsList = ['Angry','Meh','Happy']
# Button A sends a "flash" message.
emo = random.choice(FeelingsList)
radio.send(emo) # a-ha
# Read any incoming messages.
incoming = radio.receive()
if incoming == 'Meh':
elif incoming == 'Happy':
elif incoming == 'Angry':