Tuesday, March 19, 2019

Day 19: Turn your microbit into a remote control


On Day 19 of our March Maker Series, we'll share a HOW to MAKE skillbuilder in our micro:bit series of tutorials.



Yesterday I shared some tips on how to get started using a servo motor with your micro:bit

Today I’d like to add one more fun way to extend your micro:bit using another micro:bit as a remote control using radio signals.


Check out this short video of how I can use 1 micro:bit to open a box that is controlled by a microbit and a servo motor










The first step was to write a program that opened the box when you pressed A and closed it when you pressed B using only 1 micro:bit








Now let’s add another micro:bit as a remote control.

Start by adding the following code to the SECOND microbit






You’ll also need to use this code snippet to allow the microbits to talk on the same channel.









Now go back to your first micro:bit and change the code you were using for button A to this:







Take a look at the code and see if it makes sense.

Now continue to build on that code until it looks like this







Great… you’re almost there..


Now let’s add the code that tells your microbit what channel to listen to.







Now it’s time to see if your code works.


I kept the microbit with the servo plugged into the computer to give it as much power as possible. Tomorrow I’ll look for some fresh batteries.


Reset both microbits


And try pressing A and B on your remote microbit to open and close your box. 






Tomorrow we’ll work on an escape game narrative that uses our new micro:bit duo!


What would you create with these new skills in your toolbox.

No comments:

Post a Comment