Unit 1 -

Display & Buttons

In this first unit, you will learn about the different features of the M:B. You will then be invited to display text and animation on the M:B's front interface. 

Themes: Micro:controllers, Display, Buttons, LEDs, Animation. 

Intro to the M:B

Let's get to know the M:B! Watch the following video: Introduction to the Micro:bit.


You are now ready to explore the different characteristics of the micro:bit using this worksheet and/or through these two videos. Have your M:B at hand while learning about its characteristics.


Discussion

Discuss... Where would we find microcontrollers like the micro:bit in our daily life?

Watch the video: What is on the microcontroller?



Ready for your first challenge?

Let's learn how to... Display Text!

Challenge #1 - Name Tag and Secret Message

For this first challenge, you are invited to use the small lights on the front of the micro:bit to display your name and a secret message. Those small lights are called LEDs. 

Since this is your first M:B challenge, here are the steps to follow:

Step 1. Go to micro:bit's online editor MakeCode or open the micro:bit education app on your device. 

Step 2. Select New Project, give your project a name and click on Create.

Your project window will open and will look like this (see image). 



The Makecode platform is divided into 3 sections: the workspace, the toolbox and the simulator.

Step 3. Try out the first M:B challenge: 

When Button A is pressed, have the M:B display your first name.

When Button B is pressed, have the M:B display your last name.

When Buttons A and B are pressed at the same time, have the M:B display a secret message.

You can drag and drop the blocks of code from the toolbox to the workspace. They clip into place like puzzle pieces. This type of programming is called this block programming

Once the blocks are placed and connected, it is called a stack. You can have several stacks of code in one project. For example, this challenge involves 3 stacks (see image).

Step 4. Transfer your code onto your M:B using the USB cable or via Bluetooth. Here is how.

Step 5. Activate your program by pressing on each button: A, B and A & B. Your name and secret message should scroll through the micro:bit LEDs!

Step 6. Save your code in the program tracker provided by your teacher. If you are the teacher, scroll down to the 'Teacher Tip' section to learn more about program trackers.

...Follow these 6 steps for the challenges presented in each unit.

If you need help with the Makecode platform or aren't sure how to transfer your code to the micro:bit, here are some tutorials:

Tutorial: Introduction to Makecode for Micro:bit platform

This video tutorial walks you through the https://makecode.microbit.org interface to help you get started with coding your micro:bit.

How-to download from makecode and load your HEX file onto your Micro:bit

This video tutorial walks you through getting your code onto the actual micro:bit.

How-to Pair your Micro:bit to Chrome Browser for direct downloading

This video tutorial walks you through a faster way to get code onto the actual micro:bit.



Ready for your second challenge?

Let's learn how to... Display Animation!

Challenge #2 - Tiny Dancer

For this second challenge, you are invited to use the LEDs to create an animation of a tiny dancer. Imagine that the M:B logo is the dancer's head and the LED display is its body. Use at least 4 basic blocks to code your animation and try using a different INPUT to initiate your program. This means instead of activating your program with buttons A or B or A & B, try on shake or any other input of your choice.

!! Remember to follow the previous 6 steps.

.

Hint. If you're feeling stuck, try looking for these blocks. Change the dancer's position by clicking on each LED.


Experiment. Once you've got your tiny dancer dancing, try creating a new animated shape such as a beating heart, Experiment with different elements of code such as loops, pauses or different inputs (starting blocks). 

Your code could look like this, for example. There are many different ways of coding a project - your code could differ from someone else's but produce the same result.

TEACHER TIP!

The MakeCode site does not save code or projects. Projects are temporarily stored in your browser's cache. Therefore it is important to provide students with a program tracker - a form or document in which the students can easily copy-paste their code for each challenge. Not only are these program trackers a great way of keeping track of student progress, but can also be used as portfolios and a means of reflecting on learning and next steps.

If you are teaching online, there are different ways for students to share their code. Some ideas include: using a tracking document, having students copy-paste the link to their in the assignment in your virtual classroom, creating an online form to fill out, making a portfolio, or any other preferred method.

During an online class, students can also copy-paste the  link to their code in the videoconferencing chat box and you can then view the code or simulator with the rest of the class.

GOING FURTHER

...Here are some Beginner Lessons for Micro:bit.

...Have students explore the use of coordinates to control the LEDs in the activity Animation and Patterns.

Keeping Track of Your Code & Process

Don't forget to keep track of your code! Use the tracking document provided by your teacher to save and track your M:B projects.