Micro:bit Based Neck Stretching Game With Meowbit BLE
Introduction: Micro:bit Based Neck Stretching Game With Meowbit BLE
Sitting in front of the computer all day is exhausting, so we decided to make a game with Micro:bit and Meowbit to stretch our necks and relax. Meowbit can communicate with Micro:bit through the wireless SD BLE module, so we made an interactive game based on this feature.
All the things we used are listed below, and the code for this project is also provided in this article, so let's give it a go!
If you like our projects and tutorials, you can follow us on Twitter, Facebook, and Youtube for more interesting STEM projects and ideas.
Supplies
Electronics:
1 × Meowbit Game Console
1 × Micro:bit V2
1 × Wireless SD BLE Module
1 × Hook-and-loop fastener
1 × Lithium battery 400mAh
1 × battery holder
2 × AAA battery
1 × Micro:bit silicone case
You may also need some bobby pins.
Online Service:
Microsoft MakeCode
MakeCode Arcade
Step 1: Design
Our idea is to make a game on MakeCode Arcade, and then write another program with MakeCode to control the sprite in the game.
The protagonist - the puppy has to eat the bones dropping from the sky in 25 seconds.
And by tilting Micro:bit to the right or left, the puppy would move correspondingly in Meowbit.
Micro:bit collects its gesture and controls the puppy sprite on Meowbit through the 2.4G wireless communication control.
Step 2: The Program of Micro:bit on MakeCode
The program is simple: set a radio group 1, by evaluating whether Micro:bit is leaning to the left or right, it sends different wireless signals.
You can also open the program directly on MakeCode here
Then download it to your Micro:bit.
Step 3: The Program of Meowbit on MakeCode Arcade
Set a radio group 1. When receiving the radio signal from Micro:bit, it controls the sprite (the puppy) to move to the left or right.
Or you can open the program directly on MakeCode Arcade here
When you open the link of this program directly, you may find that the box of the Set Radio Group is blank, then please delete the block, and then drag a new one from the Sdwireless section and change the number 0 into 1.
When you finish your program, download it to your Meowbit.
Step 4: What Should I Do With the Error Report
If you see an error report when opening the MakeCode Arcade program and the simulator is not working, it is because MakeCode Arcade currently doesn't support the SD wireless BLE module perfectly. We can just ignore it, because it works at last when downloaded to the game console (Meowbit).
Step 5: Turn on the SD BLE Module
Remember to insert the SD module into Meowbit and switch it to the green light mode (2.4G)
Step 6: Power Micro:bit and Meowbit With Batteries
Connect Micro:bit to the battery holder holding two AAA batteries.
Connect Meowbit to the 4000 mAh lithium battery.
Step 7: Tips - Fix Micro:bit on the Hook-and-loop Fastener
Now you see why we put a silicone case on Micro:bit, because it's easier to fix Micro:bit on the hook-and-loop fastener with some bobby pins in this way.
Step 8: Done! Test It Out
Tie the Micro:nbit and battery on your head and see how it works ^^
Test it out and enjoy your work! 391