Professional Documents
Culture Documents
Course 2 - Exploring - The - Micro - Bit
Course 2 - Exploring - The - Micro - Bit
• Computer-science
• Scratch
• micro:bit
Print lesson
• 65+ mins
• micro:bit
Resources (2)
What makes Scratch3 for micro:bit exciting for the classroom is its ability to interface the
block programming with the micro:bit chip set controller, either through a USB dongle,
or using its battery-powered bluetooth remote interface. The micro:bit chipset contains
several useful integrated functions that perform on Scratch3’s interface. There are two
push-buttons, a 5x5 LED light display, and built-in compass, tilt and accelerometer
functions. This allows your students to control the Scratch3 display with the chipset in
their hands, just like a game controller, one that they build and integrate themselves.
Let’s take an example. The Foot-Hop game. Students love competing, as long as the
game is simple and easy. If you cross your legs, then hop your free foot up and down,
you quickly find your leg muscle tiring. It’s a big muscle! Using a micro:bit’s gyroscopic
features and its bluetooth, then tying a programmed micro:bit to their shoe laces, the
Scratch3 interface will count how many times students were able to hop their foot (or
hand) in say, a minute. Wait, that’s not all! We can assemble more complete block
coding, using the visual program tiles and its graphical sprites, backdrops and sounds
library, to create a rich sensory control environment. Each time a student’s foot or hand
hops, their personal sprite on the Scratch 3 screen can leap in the air, as it shouts out
the number of hops. Each micro:bit also has a built-in voice module and flashing LED
display that could buzz out ‘Breanna hopped 75 times!’ then flash a scrolling 75!
Background
Teachers are highly encouraged to first complete the following:
Teacher Guide
Learning Objectives
1. Unpacking the micro:bit kit and powering it up to check its operation.
2. Building simple code sequences in Microsoft Block Editor to confirm functions.
3. Develop agility in applying different onboard functions to affect code processes.
4. Apply the above knowledge to develop a ‘how-to’ ‘Quick Start’ guide that uses
these features as an integral part of your classroom lesson planning.
Agenda
• Background
• Setup Activity (20 mins)
• Coding Challenge Guided Practice (20 mins)
• Independent Practice – Scripting Student Lessons (15 mins)
• Present Independent Practice - Teachers Present Projects (5 mins per group)
• Quiz (10 mins)
The function of MS Block Editor is solely to program the micro:bit, not animate a stage.
It uses a similar block coding method that you should already be comfortable with, after
Course 1. There is a very useful graphic emulator on the MS Block Editor display, that
shows you what your real micro:bit should be doing. Think of MS Block Editor as taking
your car to a tune-up mechanic, before going for a spin through Scratch 3 Land. After
we get your micro:bit all turned up in MS Block Editor, then we will introduce the Scratch
3 link interface, where you’ll learn a facility in programming your micro:bit for stage.
Activity
What you'll need
micro:bit Features
Open http://microbit.org/ and scroll down a half page to ‘I’m a teacher’ and ‘I’ve got my
micro:bit’. BBC micro:bit teachers are in UK, not USA, and the website no longer requires
the teacher registration anyway. We’ll use the right panel ‘Get Started’ under ‘I’ve got my
micro:bit’. Go ahead, click on it. Hello! Then click on Features, if you haven’t done so
already. We’re looking at the ‘front’ of the chipset at left, and ‘rear’ of the chipset at right:
[IMAGE] front and rear of micro:bit
The ‘front’ at left has Button ‘A’, then in center, a 5x5 LED display, with upper left as (0,0)
and lower right as (4,4) when addressing which LED to light. At right is Button ‘B’. Along the
bottom are three addressable input/output ‘pins’, 0, 1, 2, then a 3V power ‘pin’ and a ground.
The ‘rear’ at upper left has a bluetooth antenna, then a USB dongle connector at top center,
a reset button, and a 3V power receptacle at top right. Stencils identify each of the chips.
In software, using a voice emulator and connecting to an external speaker with pins 0 and 1,
the micro;bit can also perform machine voice imitations, like Steven Hawkins own emulator!
Q. How would you write this Features paragraph into an ‘explore’ presentation for students?
Documentation
Unwrapping
Micro:bits originate in UK and are sold through US resellers, as both kits and individual
chipsets. Preferably, because of the difficulty of finding compatible components, we suggest
you buy OEM kits like the one we’ll show. Remember, a Chinese chipset knockoff is now
competing with micro:bit, and resellers are re-kitting with used and returned components.
There are good after-market vendors like Kitronik UK and Elegoo CH for the higher level of
circuit-building and chipsets, but for right now, find a quality, known supplier of original OEM
kitted micro:bits, then you can follow along with this discussion.
Your bubble-wrap package contains a USB dongle (identify the trademark black-on-white),
safety guide and quick start flyer, a twin-AAA battery pack with correct-shape power jack
and an authentic micro:bit in static foil. If your kit doesn’t look like this, you’re not ready.
WARNING: As adults we learned how to unpack electronics. We know to unwrap
and lay out components, read instructions, combine components, and test
(explore) in sequence. Students will need scaffolding before opening day! We
know what an anti-static bag is on delicate electronics, and we know not to bend,
poke or twist the components. In this Course 2, more than any other, you’re
going to want to take written notes on how you’ve acquired this information. Think
how to distill that instruction set down to K-12, and record notes as we go. Once
you’re on the other side of this learning curve, it’s very difficult to de-construct it!
[IMAGE] Unwrapped kit, showing USB dongle, battery pack and micro:bit (in foil)
Assembling a micro:bit
Time yourself in this exercise so you have an idea of your prep before class, and setup time
at the top of the hour. Carefully open the foil pack and slide your micro;bit into your palm.
Get in the habit of holding it by the side edges, not by the top and bottom pins. Turn it over
and get familiar with both sides’ components. Break a battery pack open (our kit came with
batteries, your kits may not), then taking two new AAA batteries, correctly install them in the
battery holder. Look closely at the battery jack and the connector socket on the micro;bit.
The wires are slightly offset, and there’s a vertical fin that only fits one way, so only one
orientation (battery polarity) is possible. The jack fits very snugly into the socket (below):
[IMAGE] Top edge, showing USB port, reset button and 3V DC power socket:
Start up auto-testing
Go ahead, carefully plug in the battery pack (if you don’t have new batteries you can also
just plug the USB dongle into a spare computer port, then into the micro:bit USB socket).
After a moment the front LED display will light solid red 5x5, then start flashing faster, and
flickering faster, until it (shortly) stops with a single LED lit in the center ((2,2). Fadeout.
[IMAGE] micro:bit LEDs all lit and micro:bit LED (2,2) lit from auto-test
Be watching carefully! The micro:bit can’t self-diagnose its display. If all the LEDs are lit and
then smoothly flashing with no dead LEDs, the display is functioning correctly. The single
LED fades out, then HIEILILIO, will scroll across the screen, following by A I , the
prompt to test Button A (on the left). Push it. The LED display will fully light up then fade,
replaced by B I to test Button B on the right. Push it. Again the display will fully light and
fade, then will scroll out SIHIAIKIEI! The setup is asking you to test the onboard
gyroscope (compass, tilt, accelerometer). Shake the chipset gently in all directions. If all
LEDs (after a bit) light up 5x5, then the accelerometer function is working correctly. Next the
display will scroll CIHIAISIEITIHIEIDIOITI! , then show a flashing LED in
the (0,0) upper left position, with a fixed LED in the (2,2) center. This is a test of the tilt and
compass functions. Tilt and rotate the chipset, trying to ‘chase’ the two LEDs until they
merge together into one flashing LED. As soon as you achieve that, the display will scroll
GIRIEIAITINIOIWIGIEITICIOIDIIINIGI!
The LED display cycles through a number of flashing shapes, including a ♥. You’re done!
Your micro:bit has passed a startup auto-test, and is ready to code!
WARNING: The self-test we’ve described will only display with a new micro:bit
‘flashed’ at the factory. ‘Flashing’ is the process of downloading hex code onto
the chipset to run a self-test. If the micro:bit was used and returned before it was
resold to you, (or if you are going through a pile of used chipsets to make sure
they still work), the micro:bit may have been ‘flashed’ with a new code sequence,
including one that may display nothing. The micro:bit might be OK! We’ll create
our own test code to ‘flash’ onto the micro:bit, so you can quickly tell if a micro:bit
is defective, or was re-flashed with a new hex code that had no LED functions.
‘Kid-proofing’ micro:bit
At this point, as a teacher, you’re already thinking about those 30 micro:bits and 30
battery packs with those 60 fragile battery wires you’ll be responsible for keeping intact.
micro:bits can receive 3V DC power through the USB dongle, (whether or not it’s also
being supplied by a battery pack, so don’t worry). Power can also be supplied to the 3V
and GND pins (with alligator-clip jumpers if students are sharing from power packs).
Watch out for polarity!
Each has advantages. MI:power provides compact power and even has a tiny ON-OFF
switch (upper left on rear view below) to save the battery life, but it doesn’t protect the
display. MI:pro has a clear-shell case, but fragile wires are still exposed, and the unit
can’t be turned off, unless you take the time after class to pull all the batteries, Ibut
then you have to take time before class to correctly re-install all those batteries again.
Q. When your school places its micro:bit order, what will you recommend for add-ons?
[IMAGE] From top left MI:power rear, MI:pro rear, MI:power front, Mi:pro front
Flashing an auto-test
Quickly review your Course 1 notes on Scratch 3. We will be using similar block coding
in MS Block Editor, with a similar set of block code tiles and a new interface. You may
choose either https://makecode.microbit.org/, for a real-time version Block Editor, or the
legacy version of the Block Editor at https://www.microbit.co.uk/app/#create:xczaux
The legacy version creates a unique instance on their website, and gives you a unique
file name, so you’ll be able to identify the downloaded hex scripts that you created. But
you have to first assemble the block code tiles, then click on ‘run’ to see how they work.
This is the traditional programming sequence, and you’ll recognize it as a teacher, as a
‘discovery’ teaching tool, enticing students to try coding, then ‘run’ it to see if it works.
The real-time version at makecode immediately shows what you’ve stacked together,
which can be disappointing to students if nothing is happening, or if something that was
happening stops happening. It’s just a personal preference, but remembering Scratch 3
uses a Click (flag) to ‘run’ interface, we’ll do our ‘flashing’ from the legacy code version,
that way you can import the hex script at the end of this Course 2 for your test protocol.
Guided Practice
We’ll build a test protocol in MS Block Editor’s legacy version for micro:bit. We’re using
Chrome as a browser, because it’s also on Chromebook when we start programming in
Scratch 3, during the third course. If you don’t have Chrome, go ahead and download it.
Q. After you successfully get your micro:bit ‘flashed’, how would you achieve this in class?
You should now be ready to attempt an independent practice problem(s) using the
LEDs and each of the gyroscopic compass, tilt and accelerometer functions from the
function bar on the left. Our guided script took a half hour of trial-and-error, so allow
yourself a couple hours and a cup of coffee at the end as a reward. Welcome to the
BBC micro:bit! You’ll find a complete chipset auto-test hex file link below as a go-by.
Independent Practice
Before you begin Independent Practice, we’ll establish metrics you’ll be challenged to.
• Metric 1 will be programming, editing and uniquely naming your own Block Editor script,
to test all the LEDs. You’ll need that skillset as a minimum before you can teach it;
• Metric 2 will be writing program code sequences to test the compass function, and to
coordinate an LED ‘arrow’ display as it rotates about the 5x5 while you turn a circle;
• Metric 3 will be writing program code sequences to test the tilt function, and to
coordinate an LED ‘dot’ display as it rolls toward the corners while you tilt it around;
• Metric 4 will be writing the code and a script for a 1-hour lesson plan on micro:bit.
---
This lesson has been developed in collaboration with K12 Maker Integration
I need to know...
I am a...
• Student
• Teacher
• Developer
• Robot
• Coder
• Accessory Maker
• Reseller
• Part of the Foundation