Free your radio functionality on the micro:bit!

2microbits take2

Via spark fun education

The micro:bit has made a huge impact on getting “quicker to awesome” in the classroom. From third grade to high school and beyond, it has proved itself to be a platform that is easy to learn and prototype projects on. But sometimes there is that one thing that sometimes just causes you to stub your toe. For many people that is the radio functionality that comes natively on the micro:bit.

If you have two micro:bits sitting around, grab them and join me in this post to take a closer look at how to set up the radio for communication and how to send data from one micro:bit to another. Ready? Good! Here we go…

First of all we are going to be using Microsoft® MakeCode to program our micro:bit! Head on over to makecode.microbit.org!

The radio is native to MakeCode, which means we don’t need to add anything and can just start working with the blocks that are already at hand. You should have just the basic On Start and Forever blocks in your coding area.

Derek blog 1

Now, the first thing that most people overlook when they are exploring the radio and get hung up on is assigning a group ID to your micro:bit(s). You do that by using the Set Group (#) block. This is the same thing as setting your micro:bit to a specific channel. For two micro:bits to communicate with one another, they need to be on the same channel. This is often overlooked when you are doing this for the first time. For example, we set our micro:bit to group 4. All micro:bits that we are planning on communicating with should be assigned the same group # in the On Start block.

Now that the micro:bit channel is set, we are free to send data out over the radio. Any data that is sent can be heard by any other micro:bit that is on that channel. So, if we were to send the number 3 over the radio on group 4, all other radios on group 4 could receive that number and do something with it.

See more!

Make a robot friend with Adafruit’s CRICKIT – A Creative Robotics & Interactive Construction Kit. It’s an add-on to our popular Circuit Playground Express, FEATHER and other platforms to make and program robots with CircuitPython, MakeCode, and Arduino. Start controlling motors, servos, solenoids. You also get signal pins, capacitive touch sensors, a NeoPixel driver and amplified speaker output. It complements & extends your boards so you can still use all the goodies on the microcontroller, now you have a robotics playground as well.

Join 7,500+ makers on Adafruit’s Discord channels and be part of the community! http://adafru.it/discord

CircuitPython in 2018 – Python on Microcontrollers is here!

Have an amazing project to share? Join the SHOW-AND-TELL every Wednesday night at 7:30pm ET on Google+ Hangouts.

Join us every Wednesday night at 8pm ET for Ask an Engineer!

Follow Adafruit on Instagram for top secret new products, behinds the scenes and more https://www.instagram.com/adafruit/

Maker Business — Despite multiple bankruptcies, RadioShack continues to find ways to keep the lights on

Wearables — Molding with glue

Electronics — A few words on inductor resistance

Biohacking — Running Blades

Python for Microcontrollers — Help bring CircuitPython to other languages!

Get the only spam-free daily newsletter about wearables, running a "maker business", electronic tips and more! Subscribe at AdafruitDaily.com !

No Comments

No comments yet.

Sorry, the comment form is closed at this time.