Things used in this project

Hardware components:
Microbitheart
micro:bit BBC micro:bit board
×2
5V power supply (generic)
Like a phone charger.
×2
Adafruit industries ada592 image 75px
USB-A to Micro-USB Cable
×2
White paper
Diffuse the LEDs by taping white paper over them.
×1
Software apps and online services:
Mu editor
Editor for MicroPython.

Code

bikeyface.pyMicroPython
Put this code on both micro:bits using the Mu editor.
# A micro:bit Firefly
# By Nicholas H.Tollervey. Released to the public domain. Modded by Alex Glow to display random emotions on your bike.
import radio
import random
from microbit import display, Image, button_a, sleep

faces = [Image.HAPPY, Image.SAD, Image.CONFUSED, Image.ANGRY, Image.ASLEEP, Image.SURPRISED, Image.SILLY, Image.FABULOUS, Image.MEH, Image.HEART, Image.SKULL ]

# The radio won't work unless it's switched on.
radio.on()

# Event loop.
while True:
    # Button A sends a "flash" message.
    if button_a.is_pressed():
        radio.send('flash')  # a-ha
        display.show(random.choice(faces))
    # Read any incoming messages.
    incoming = radio.receive()
    if incoming == 'flash':
        display.show(random.choice(faces))  # of course this does not actually display the same face as your "signal" micro:bit

Credits

Photo on 7 5 17 at 5 06 pm 7 05huowsyxv
Alex Glow

The Hackster team's resident Hardware Nerd. I like robots, music, EEG, wearables, and languages. FIRST Robotics kid.

Contact

Replications

Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback

Comments

Similar projects you might like

Bikeyface Emoji Taillight (with Micro:bit)
Easy
  • 478
  • 12

Full instructions

Express yourself with your bike lights!

Make Your BBC Micro:Bit Talk Using MicroPython
Easy
  • 389
  • 8

Protip

Today, I am going to show you how to make your Micro:bit talk using a very easy programming language called MicroPython.

Display Your Name On Micro-Bit Using MicroPython
Easy
  • 353
  • 6

Full instructions

In this tutorial, I am going to show you how to code BBC micro:bit using MicroPython to display your name and other basic symbols.

magic button trick
Easy
  • 249
  • 4

Full instructions

Build a magic trick to amaze your friends that uses the micro:bit’s compass to detect a nearby magnet!

magic button trick

Team micromonsters

Getting Started with BBC Micro:Bit
Easy
  • 928
  • 11

Full instructions

This tutorial will show you the basics to get started with BBC micro bit.

Are You in Tune?
Easy
  • 583
  • 6

Work in progress

There are many ways/apps/tools to tune an ukulele, and now there is one more!

Add projectSign up / LoginAbout BBC micro:bit