Marija
Published

Roll a D20 with Your Muscle Flex (Spiker:bit + micro:bit)

Flex your muscle to roll a digital D20 using the Spiker:bit and micro:bit. This beginner-friendly project turns your body into a controller

BeginnerFull instructions provided30 minutes50
Roll a D20 with Your Muscle Flex (Spiker:bit + micro:bit)

Things used in this project

Hardware components

BBC micro:bit board
BBC micro:bit board
×1
Spiker:bit
The Spiker:bit by Backyard Brains is an expansion board for the micro:bit that allows you to develop DIY Brain Machine Interfaces (BMI), also known as Brain-Computer Interfaces (BCI). A BMI is a computer that interfaces directly with the electrical signals of your body. The Spiker:bit has a port to connect to a micro:bit (computer) and a port to record EMG (muscle), ECG (heart), or EEG (brain) signals from your body.
×1
Electrodes (ECG) and Orange Cable
×1
AA Batteries
AA Batteries
2 x AA Batteries
×1

Software apps and online services

MakeCode
Microsoft MakeCode

Story

Read more

Schematics

Spiker:bit Schematics

Code

MakeCode Editor

MicroPython
spikerbit.start_muscle_recording()

def on_forever():
    spikerbit.print(spikerbit.muscle_power_signal())
    if spikerbit.muscle_power_signal() < 50:
        basic.clear_screen()
    else:
        basic.show_number(randint(1, 20))
basic.forever(on_forever)

Credits

Marija
2 projects • 0 followers

Comments