blocks, events and messages
In this section, we are learning different ways for the micro:bit to receive commands, or as they are called in coding, events. Events enable the interaction between us and the device (micro:bit). Some equivalent events in our daily life are:
Pressing a key on your keyboard
Starting a car by turning a key or pressing a button
Saying a command to enable your phone's digital assistant
The events we are exploring in the micro:bit are on start, forever, on shake and on button A pressed.​
We can trigger events with many different blocks in MakeCode as we saw in this section, but so far we only displayed text. In the next section, B - Animations, we are working with images.


MakeCode is a platform that helps us create programs that the micro:bit can understand in any of three different computer languages, Blocks (KCJ's choice), JavaScript and Python.
In this section, we'll go over the main MakeCode platform concepts that your students need to be familiar with to comfortably start their coding journey with us. Start by visiting on your favourite browser the following site makecode.microbit.org.
Once on the site, click on the big purple button that says New Project to navigate to the main application. You will be prompted to give your project a name and then click on the Create button.
The process may take some time depending on the computer speed and internet connection, but once all is loaded we'll be in the main area of MakeCode.
MakeCode can be divided into three different areas. the Workspace, the Blocks and the Emulator. Let's take a look at each of them:
This is the empty area on the right side of the screen. This empty space is waiting for you to add blocks to provide instructions that the micro:bit will execute. By default, it has the forever and on start blocks.
The Blocks area is where all your available instructions are located, conveniently grouped into categories and colour coded.
This is our testing ground, the virtual micro:bit. This emulator has most of the functionality of the physical version and a few extra tricks that you'll learn at some point.
With a micro:bit and MakeCode, we could create interesting applications to visualize data, but we are introducing more tools that will add variety to our creations.




​Images are very useful to express complex concepts in a simple and fast way. They are also fun and creative! In this section we are going to experiment with images and animation, bringing our creations to life.
The micro:bit only has 25 LEDs to create text and images, but you'll be surprised at how much can be said with so few lights.
It's alive! Well, at least the heart beats once. Now it is time for a mini-challenge!
Every time you see the red question mark​❓, it indicates a mini-challenge for you to try. After completing the challenge or giving it fair try, proceed to open the container and see how we solved it.
Imagine how many other different animations we can create. Maybe you can tell a story using a micro:bit animation!
In the next section, we are getting serious about math. See you in Counting!​​​







​ ​
In this section, we are taking our code to a new level. As humans, we see, smell, touch, taste and hear the world around us, and we are going to use some of those senses to help the micro:bit do something similar, by utilizing different sensors built into it.
The first sensor we'll work with is the ability that the micro:bit has to detect temperature and along with it, we'll learn the concept of if statements in coding.
If statements provide computers with the ability to choose between different options or paths. It opens many different possibilities and makes our programs more interesting and diverse.
These projects ​​​will help you when working on the main Activities as they all use micro:bits and MakeCode as the brains controlling the visualizations and servo motors. It is time to continue, learning about the other tools. See you in the next section 03 - Servo Motor.




In this section, we are doing math with our micro:bit. Math is a key element in any human endeavour and after this lesson, you will be coding your own calculations in no time.
Let's start our Math and micro:bit exploration by counting. First, we will create a counter from 1 to 5 using a basic approach, and then we'll find a better way to do it, with more control.
​​Great work in getting the counter working! time for a mini-challenge.​​​
We have made lots of progress and in the next section If Hot!, we will explore some really exciting concepts in coding and the micro:bit!​​​










