Introduction: Dragon Ball BreakoutEDU With Micro:bit and Tinkercad!✨
Supplies
2 micro:bits minimum, 8 would be recommendable.
3D printer
Filament (PLA)
Acrylic paint
Step 1: Design the Dragon Balls and Radar on Tinkercad
We can remix this project shared in Thingiverse: https://www.thingiverse.com/thing:4660018
to modify it and use it with the micro:bit.
To create the balls, here's a tip: add a sphere and stars! Don't forget to press shift while designing to scale the objects and have a perfect sphere and stars!✨
Here are the projects we created, just in case they can inspire you!🥰
Radar: http://www.tinkercad.com/things/0K4XMn1I9yO
Dragon balls: http://www.tinkercad.com/things/bH44VjVfi9r
Step 2: Print the Radar and the Balls
Then, preheat your 3D printer and get ready!
Step 3: Code the Micro:bits in MakeCode
The first step in creating the treasure hunt game will be to create the treasure hunter programming. For the first time, we are working on creating a different program for each board: a search engine and a treasure.
To create the program of the micro: bit "Finder", we will need:
When starting the micro: bit, set the group number (for example: 1). We will also add a variable with the name ID to be able to set the name of the micro: bit Finder. We can use a number or, if we add a block of text, the name of the search engine or the search engine.
We will also add a blog that will trigger us events. When you receive the message (string), it means that you are touching the treasure, so it will display the message "Found". In addition, we will wait for a time, for example 200 milliseconds, and clear the screen.
To create the "Treasure Board" program:
Program the “B” button so that when pressed, it starts emitting a signal.
When starting the micro: bit, set the group number (for example: 1) and also the transmission power, which is the range that the board will have to send the signal to the board called "Finder" (0 would be because only send the signal when they are playing and 7 would be for the maximum distance the micro reaches: bit: almost 70 meters).
We will also add a block where, forever, it will send the message (string) "1" and pause 200ms. We will take this step to find out in which group the micro: bits are. If later, we wanted to add more treasures, it would help us to know what treasure we are looking for.
The next step would be to expand the programming of the micro: bit "Finder" to include a graph showing the distance between the two micro: bits.
When you start the program, it will send the number 1.
Upon receipt of the message (Received String),
We will create a variable called "signal" and set it as "Received Packet".
We will include a new block called “Plot bar graph”. With this, the micro: bit shows a bar graph that magnifies the stronger the signal and the closer it is. Use the math block “map” to assign to the radio signal strength, ranging from -95 (weak) to -42 (strong), numbers that, in the range 0 to 9, are used to draw a graph of bars in the micro array of the micro: bit.
Finally, we will add a conditional block where: if the signal strength is greater than or equal to -50, it will display the message (string): "found"
Inspired by the Treasure Hunt program in the MakeCode page: https://microbit.org/projects/make-it-code-it/treasure-hunt/, we will add some coding to the radar one (receiver) to map the signal to know where the dragon ball is, and also some more code to the Dragon ball, so that when a radar finds it, it shows: Found!☄️🐉
Here are our examples of coding:
Radar: https://makecode.microbit.org/99157-54890-57322-92058
Ball: https://makecode.microbit.org/74106-46143-57939-71932
Step 4: Create Some Challenges for a Breakout And... the Sky Is the Limit!✨
You can search around the world with me! says the Dragon Ball lyrics! Now it's the moment to add the spark to include challenges in each ball. We can relate them to the contents we are working in class and design them in Canva, for example. Now, when they will find a Dragon Ball, we will let the MAGIC happen!🥰✨✨✨