How to connect micro:bit to the Internet using the MuseLab micro:bit Booster (WiFi IoT Robotic Shield)

What is micro:bit?

micro:bit is a popular single board computer designed for learners of physical computing and coding. It is inexpensive, easy to use and offers hundreds of online learning tutorials. It is, in fact, a very good device for anyone to start learning about computing and coding. However, there is one big drawback on the micro:bit!

The micro:bit supports Bluetooth radio communication but doesn’t support WiFi, which mean that it cannot connect to the internet directly. It would be very useful if one could connect to the internet via the micro:bit. As a result of this, MuseLab decided to make a very easy to use and compact complementary shield for micro:bit and below is a detailed 7 steps guide on how to connect micro:bit to the internet.

What is micro:bit?

micro:bit is a popular single board computer designed for learners of physical computing and coding. It is inexpensive, easy to use and offers hundreds of online learning tutorials. It is, in fact, a very good device for anyone to start learning about computing and coding. However, there is one big drawback on the micro:bit!

The micro:bit supports Bluetooth radio communication but doesn’t support WiFi, which mean that it cannot connect to the internet directly. It would be very useful if one could connect to the internet via the micro:bit. As a result of this, MuseLab decided to make a very easy to use and compact complementary shield for micro:bit and below is a detailed 7 steps guide on how to connect micro:bit to the internet.

Step 1. Go to the default Mircobit Coding Environment at https://makecode.microbit.org

Step 2. Click the “Advanced” tab to expand the menu to show the additional advanced menu.

Then we select the “Add Package” tab. A popup dialogue will appear like below. Type “Muselab” to search the MuseIoT package.

Step 3. Click on the image with the MuseLab micro:bit Boster shield image

Bingo! You are now ready to connect to the internet with the MuseLab micro:bit Booster. Take note that the front page of the PXT* coding page has five more tabs: “MuseIOT”, “MuseRobotic”, “MuseLoRa“, “MuseSensor” and “MuseOLED” 

PXT = Programming eXperience Toolkit

Step 4. Now click on the MuseIOT tab, The basic IoT commands will pop out.

Among all of the commands, the first two most important commands are “Initialize MuseLab Wifi Booster and OLED” and “Set Wifi to ssid and pwd”.

Below are how to use these two commands typically.

at the current stage, the MuseLab micro:bit Booster can only accept hotspot or SSID names that are shorter than 20 alphanumeric characters and consist of no special characters  (Spaces are acceptable). There is a 5-second delay after the Wi-Fi shield was initialised before it can connect to Wi-Fi networks. So, we add a pause of 5000ms in between like below

These two commands start the shield and have it to connect to a WiFi network called “muselab”.

Step 5 only applies if you haven’t initialized the MuseLab micro:bit Booster with the respective block.

Else, please continue with Step 8

Step 5. To initialize the OLED screen

As the Booster Shield comes with OLED screen (resolution: 32 pixel x 128 pixel), so we input the numbers as shown in the block below.

The screen should start before the Wifi shield so we drag the “Initialize MuseLab WiFi Booster” block after the initialization block.

Step 6 only applies if you haven’t initialized the MuseLab micro:bit Booster with the respective block.

Else, please continue with Step 8

Step 6. After we have initialized the screen, we should initialize the WiFi feedback channel by utilizing the serial blocks from the “Serial” tab under “Advanced

Pick the “serial on data received ‘new line’ “ block

Step 7 only applies if you haven’t initialized the MuseLab micro:bit Booster with the respective block.

Else, please continue with Step 8

Step 7. Finally, go back to OLED tab and select “show string”. Please do not use the “show string” block from the “Basic” tab or otherwise the WiFi message will be displayed on the Mircobit 5×5 screen but not the MuseOLED screen.

Then you should go back to the “serial tab and select the “serial read line” block and place it right into the show string block.  

After successfully initial the shield, the below screen should have appeared:

Step 8. Upload your code to the micro:bit

Download your code sketch by pressing the download button. You can rename the project file for later use.

Connect your micro:bit via USB to your computer. A new device will appear in your file browser.

Copy your downloaded project file ( *.hex) to your micro:bit drive. After copying is completed, the micro:bit will reboot and the drive will disappear. Wait until the micro:bit drive reappears (which means that the reboot is completed), before you disconnect your micro:bit.

Short Initialization overview:

Full Initialization overview

After successfully initial the shield, the below screen should have appeared:

5s later, the shield starts to connect the WiFi!

If it has connected successfully, the IP address will be shown.

Please enjoy your journey with Internet-enabled micro:bit!
-END-