This project refers to the resource from https://cardboard.lofirobot.com/blockout-game-info for a fun traditional simple Blockout game, the credit of the project is by Cardboard Robots/LOFI Robot. We use mostly as is, but adjust a little for our learning goals. It uses Micro:bit's Bluetooth to communicate to a Web App made by Html+Javascript, the main task is to design and program how to move the game controller, by using multiple possibilities of the Micro:bit's sensors. Goals:
Get a fun starting experience with Micro:bit, inspire interests of programming
Get to know the Micro:bit's built-in sensors and Bluetooth
A practice of serious mindset in designing, debugging and improving to get an expected result
START A BIT > Projects Library > This page
[x] Simple: 30-60 minutes
[ ] Moderate: 1-2 hours
[ ] Challenging: more than 2 hours
The estimation bases on average situation without unexpected troubleshooting, assuming that the student meets prerequisites. It only indicates rough time needed to complete this project, but not about technical difficulty, not covering discussion and sharing time.
Almost nothing, suitable to be as a starting project with Micro:bit
1x TM005: Micro:bit V2 board with battery pack
Watch this video from Cardboard Robot, it shows what the game is, and how to program for fun!
Micro:bit’s Bluetooth is BLE (Bluetooth Low Energy), it doesn’t do “classic” Bluetooth in the usual way.
The Paddle position as a number ranged 0-100
You can modify the game conditions a bit by changing
Number of rows and collumns of blocks to break
Speed of the ball
Width of the paddle
To set your settings modify the URL adress of the APP with parameters as below:
https://cardboard.lofirobot.com/blockout-microbit/?rows=5&cols=10&speed=8&paddle=2
This replaces default existing "Radio"
Start Bluetooth UART service on-start
Get notification when connected and disconnected
"No compatible device found" problem happens, then double check pairing settings!
Make sure Bluetooth is turned on in your laptop
Make sure Bluetooth setting "pairing_mode": 0,
If still not working, try this workaround to reset Micro:bit radio/bluetooth:
Create a new dummy project, with the default "Radio", don't add "bluetooth" extension, download the program to Micr:bit, so the radio functionality is reset to default
Come back to your project with "bluetooth" extension, ensure the pairing setting right, download program to Micro:bit to test
Purpose: Make the simple setup working as a start, practice using button as input , variable in integer type
Try this example program by the Carboard Robot.
Remember to check the Bluetooth pairing setting before downloading.
Test and feel the result, what is working good, what is not?
Purpose: Safeguard variable ranges, fine-tune and improve for better user experience
Find a suitable stepping value to move the paddle when pressing, e.g. 10 instead of 5
Make sure the variable "position" will not exceed the allowed range 0-100
Add some indication for button input, e.g.
Show left/right-arrow
Beep warning sound if already reaching 0 or 100
Button A+B to reset the paddle to the middle
Here is a reference solution, you need to fix a few black-marked spots to make a working result🤪
Purpose: Try out the idea of using tilting to control the moving, there are several solutions and different results experience, test and analyze
Add extra tilting controlling to move the paddle, to make a natural and smooth result, it requires some patience to test different solutions and fine-tune for a satisfying result
Reference 1: Does it work? Fix faults if you find, test and think why it works or not
Reference 2: Does it work? Fix faults if you find, test and think why it works or not? Is it smooth as you expected? Why
Reference 3: This is the direct example from Cardboard Robot, does it work? What is the different result? Can you easily move the paddle to the left/right-most corner? Why?
Reference 4: Try out this version, a small change, test and find out the difference, think about why
Purpose: Creative task as an optional challenge task
Explore the other sensors on Micro:bit, try out some other possible and interesting way to control the paddle!
Purpose: Enhance basic knowledge understanding, reflect and summarize what we have learnt
What is BLE?
Why do we need to safe-guard the variable values?
Take 1-2 minutes to explore anything on the tools and the making flow, with curiosity, no matter how much prior knowledge you have, you should make
At least 1 interesting finding
At least 1 curious question