All tutorials

Spooky Signals

microbitpythonBeginner ⏱ 20 mins

Overview

Can you send a ghost across the room without touching it? Let's find out!

In this project you will make a ghost that can travel between two . Shake one micro:bit, and a ghost appears on the other one. The ghost is the message, and the micro:bits pass it along using .

You will write a that keeps checking for messages and shakes, and use an to notice when a micro:bit is shaken. When a message arrives, you'll store it in a , then use an to decide what to show on the .

Each step adds a little more to your ghost game, so take your time and test as you go.

🎯

What you'll learn

  • How two micro:bits can talk to each other wirelessly
  • How to use an accelerometer to detect a shake
  • How to use a while loop to keep checking for messages
  • How to show a picture on the LED matrix
  • How code runs one step at a time