Intro to Micro:bit
Lesson (25 mins):
Demonstration Code: Micro:bits should already be set up with short demonstrations that show off its capabilities.
Classroom Code / Project: https://microbit.org/projects/make-it-code-it/heart/
Equipment: (1 for each Trainee)
Micro:bit
Computer
USB cable
Skills
Using Makecode
flashing code
lighting LED matrix
Keywords
Micro:bit
LED
sensor
flash
What is the Micro:bit?
The micro:bit is a tiny computer that you will use as your primary tool to overcome obstacles. It has a bunch of built-in features that you’ll be able to control using programming.
These features include:
An LED display
Buttons (go ahead and press them!)
An accelerometer that can sense when you move or shake the micro:bit
A temperature sensor
A speaker
A microphone that can sense how loud something is
A compass that can tell you which direction is North, but can also sense magnets
A light sensor that can tell if it’s dark or light
Bluetooth that lets you connect to other micro:bits
Touch sensors
In addition to the built-in features, you’ll also be able to attach components to the micro:bit using this connector. You’ll learn more about those when you take different classes, or you might encounter some of them on your missions in other worlds.
You’ll learn more about how to control each of these features in the different classes.
Further information can be found on the Micro:bit website
How to control it?
All these features are controlled by you. You’ll be able to program it to tell it exactly what to do.
To do this, you’ll use Makecode.
What is Makecode?
To get started, we’re going to write a really simple program, and “flash” the program to the micro:bit.
Facilitators should follow the instructions as shown here:
https://microbit.org/projects/make-it-code-it/heart/
Make sure to explain what the code is doing!
How to flash?
Now that we’ve written the code, we need to get it from the computer onto the micro:bit!
Facilitator should show how to flash the program to the micro:bit.
Note that the yellow LED on the back of the micro:bit will flash as the code is getting loaded.
Once it stops flashing and is solid yellow, the micro:bit is ready to go!
Saving the Code
Right now, the MakeCode is only saved on the browser, which means if you use another computer you won’t be able to access it. So instead, you’ll want to share your code so you (or other people) can access it later.
To save the code, click on the “Share” button (highlighted below).
When prompted, publish the code.
Then copy the URL.
If Time Permits:
Modify to an icon of the student’s choice and upload again, or use the LED grid to draw their own design.