Table of Contents:
The IM01 is a bridge (or interface) to connect your BBC micro:bit to XinaBox xChips. Your micro:bit slides easily into the IM01 and xChips can be connected to it using xBus connectors. Its as easy as connecting Lego. But the IM01 is more than just a bridge:
- It has a slot where you can fit a microSD card, which allows you to record huge csv files full of data. Learn how to turn your IM01 and micro:bit into a data logger and unlock data science in the classroom.
- It has an LED on it which you can control using code. It can shine green or blue, and is a useful tool to display visual cues about a program while it is running.
- It can also provide power, and plenty of it. The micro:bit can supply up to 120mA of power and 3.3V on its output pins whilst the IM01 is able to provide 1000mA and 5V over the pins. In practice this means that performance will not degrade with larger circuits and peripherals that require 5V to run properly (e.g. 3rd party servos, motors and range finders) can now be used with micro:bit. Plug your USB into the IM01 when powering your micro:bit to make all of your peripherals more performant.
This page will describe how to control the LED in MakeCode.
To write code to interact with the LED on the IM01 in MakeCode you will need to load the IM01 extension:
- Open MakeCode and start a new project
- Click on Extensions
- Type in XinaBox/pxt-im01
- Click on search
- Select the IM01 tile
You can turn the LED on and make it blue, green or a mix of both. You can also make it 'wink', which means it turns on briefly then turns off. The simplist way to use it is to just turn on the LED:
Remember to attach your IM01 to your micro:bit before running the code.
- Connecting it up
- Loading the extension and Hello World!
- Using the turn on LED functions
- Using the wink functions to make the LED turn on once briefly
Tip: It is fun to play around with the LED but it is also very useful in applications as a way of signalling information to the user. Winking the green light on and off 3 times might indicate an action has been successful whilst holding the blue light on steady for a second could be used to indicate lack of success. Or vary the intensity to pulse the LED at key points. A lot of data can be communicated like this.