Micro:bit 101
Time 5.3 hrs

Difficulty Intermediate
Prerequisites Programming 101
Departments Human Technologies
Authors Wren Merrett
Phil Morgan
Groupings Individual
Pairs
Minimum Year Group None

Blurb

Now that you’ve learned some basic programming concepts with Scratch, it’s time to bring some of what you’ve learned into our real-life meatspace - not just a computer screen - using a neat little gizmo called a micro:bit.

Outline

Resources
What is needed to run this unit?
Cross-Curricular Links
Do not try and force this. What areas of other subjects might this reflect and/discuss language. For IB, links with ToK.
  • ...
Teacher Reflection
What was successful? What needs changing? Alternative Assessments and Lesson Ideas? What other Differentiation Ideas/Plans could be used?
  • ...
Credits
Any CC attribution, thanks, credit, etc.

This page requires you to be logged in to access it. Please login and try again.
5 mins
What is micro:bit?
Discussion

The BBC micro:bit is a handheld, programmable micro-computer that can be used for all sorts of cool creations, from robots to musical instruments – the possibilities are endless. While we won’t be getting quite that far in this unit, we’ll still do some incredibly cool stuff.

5 mins
What are we working with?
Discussion

Your micro:bit has the following physical features:

  • 25 individually-programmable LEDs
  • 2 programmable buttons
  • Physical connection pins
  • Light and temperature sensors
  • Motion sensors (accelerometer and compass)
  • Wireless Communication, via Radio and Bluetooth
  • USB interface

Sounds like a lot to handle, right? It kind of is, but we’ll be taking it step by step, and in time you’ll recognise the power of all these features. Micro:bit’s coding interface makes it easy to understand what they can do and how you can use them.

10 mins
The MakeCode Editor
Explanation

Conveniently, the creators of the micro:bit also created a couple of different ways that you can program it, right from their website! The first of the two, and the one we’ll be starting with, is called the MakeCode editor. You’ve done some work with Scratch before starting this unit, so the interface should look very familiar to you. It uses premade blocks of code to make coding simpler and easier for newcomers. When you open it up, it should look something like this.

Those blue blocks probably look pretty familiar if you’ve already used Scratch. They show when a piece of code will do its thing, and we can put other blocks inside them. To the left of the coding window is a menu, which contains a selection of submenus filled with various blocks of code. Let’s go over them.

  • Basic - the simplest, easiest to understand functions of the micro:bit, allowing you to show icons, numbers and text with the LED lights on the device.
  • Input - more ways to activate code, such as through pressing a button or pin, or moving the micro:bit in a certain way. Also allows you to use the micro:bit’s array of sensors - accelerometer, thermometer, light sensor and compass.
  •  Music - not very useful to us right now, since we need a few extra bits to allow the micro:bit to output audio, but you can technically compose entire songs using just the blocks in this menu.
  •  LED - allows greater control over the micro:bit’s LED display than you could get with the simple blocks in Basic
  •  Radio - send radio signals! Activate certain functions when a particular signal is received!
  •  Loops - make things happen multiple times, according to certain conditions
  •  Math - if you can make some numbers, you can do maths with them!

Logic and Variables are a bit more complicated, and get into some proper computer science, so we’ll leave them for now. Most of what you’ll be doing in this unit should be covered by these seven menus.

At the bottom of the screen you’ll see the Download button. This will allow you to download your code as a file that can be uploaded to the micro:bit through a USB connector. The micro:bit comes with a USB to micro USB connector, although if your laptop does not have a USB port (thanks Apple), you will need to use an adapter. These can be loaned from the server room, so don’t worry too much.

5 mins
Borrowing a micro:bit
Explanation

To succeed in this unit about the micro:bit, you will need a micro:bit. These are listed under the Electronics category in the Gibbon library, and can be loaned from the server room.

90 mins
Tutorials
Outcome

On the micro:bit website, there are six tutorials, intended to introduce you to the basic functions of the MakeCode editor and the micro:bit itself. These are:

  • Flashing Heart
  • Name Tag
  • Smiley Buttons
  • Dice
  • Love Meter
  • Micro Chat

Each of these tutorials should take no more than ten minutes to complete, so follow and complete all of them. This should prepare you for more experimentation with the device.

60 mins
Games
Outcome

Below the tutorials on the site are a set of simple games you can make for the micro:bit. These range from simple coin flippers and rock-paper-scissors games to skill-based reaction time testers and even a primitive Flappy Bird clone. Experiment with these, and see if you can complete one or two before you move on.

140 mins
Working by yourself
Outcome

Now that you’re familiar with the workings of the micro:bit, you should be confident enough to experiment on your own and create something from scratch. Spend some time tinkering with the various code blocks and see what you can create!

For your final submission, take a video of your code on screen, and of the micro:bit running the code, with audio commentary of what is going on.

There are no records to display.
Powered by Gibbon v27.0.00dev

Founded by Ross Parker at ICHK Secondary | Built by Ross Parker, Sandra Kuipers and the Gibbon community
Copyright © Gibbon Foundation 2010-2024 | Gibbon™ of Gibbon Education Ltd. (Hong Kong)
Created under the GNU GPL | Credits | Translators | Support