Project 3: Radio Talk
This is a series of projects that grew from an introductory set of group workshops that we wrote for a local school's open day to promote their Code Club. Projects 1 to 3 ran for about 20 minutes each, and projects 4 and 5 became workshops at the Code Club where I volunteer (these can each be completed within an hour). These projects were easily completed by kids from ages 7-11. The projects that use multiple micro:bits are scaleable and can work well with any number of micro:bits from 2 to class sets; with the option for kids to collaborate in pairs or larger groups.
Radio Talk is an extension of Project 1: Tilt and Point, but we will be adding radio to display a picture on another micro:bit! You’ll need at least one partner with another micro:bit. Since this project is a bit more advanced, you should already have completed Project 1 or have some basic experience with similar programs on the micro:bit before attempting it.
In this project, you will learn:
- How to extend your micro:bit programs by using radio to communicate with other micro:bits
- How to coordinate multiple different versions of program code across devices
You will need:
- A micro:bit (V1 or V2 is fine) and matching USB cable
- A computer with an Internet connection and a modern web browser
Step 1: Launch your browser, and got to the MakeCode website
- Launch your web browser by clicking on its icon
- Once your web browser loads, click in the address bar at the top and, in the address bar, type in:
https://makecode.microbit.org
Step 2: Write your code
-
Create the code below by dragging the blocks into the
forever
block so that they will keep repeating (this is the code we used in Project 1) -
Now replace the
show
blocks withshow icon
blocks, and put aradio send number
block undear each. These will send a number over radio, to other micro:bits that are listening on the same group channel. -
Now add the code below to set a group for our radio. The receiving micro:bit will need to be set to the same group number.
Save this onto the micro:bit by attaching the USB lead to your computer and downloading your.hex
file to theMICROBIT
device. Ask for help if you don’t remember how to do this.
Step 3: Partner’s code
-
Your partner can now use makecode to create the code listed below, and put it on their micro:bit
-
Download this code onto your partner’s micro:bit. Now, when you tilt your micro:bit, theirs will show a happy or sad face too! Get this code onto a few other micro:bits and you can have them all show your happy or sad faces 😃
This tutorial is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.