Course Content
About BBC microbit
Micro:bit board is designed by BBC which aims to help children at or above 7 grade to learn programming better. Micro:bit board has abundant board resources, including a 5*5 LED metric dot array, 2 programmable buttons, Compass, USB ports, Bluetooth module etc.. It is only pocket size but very powerful. You can programming, customize or control it as well. The latest Micro:bit V2 board comes with a touchable Logo and microphone on the front. A speaker is added on the back, so all kinds of sounds can be played without external equipment. The gold finger at the bottom adds a gear design to facilitate the user to better fix the alligator clip. In addition, the 2nd generation Micro:bit board also support sleep mode. Users can make it enter sleep mode by long pressing the reset button, which can reduce power consumption. The most important feature is that the CPU performance of the Micro:bit V2 board is much better than the V1 version, coupled with more RAM. So Micro:bit V2 allow users to expand more functions and create more creative works.
0/1
Transfer code to the micro:bit
This guide explains how to transfer code from a computer or tablet so that it can run on a BBC micro:bit. It covers: Transferring a program from MakeCode or the micro:bit Python Editor from a computer from an Apple device (iPad or iPhone) from an Android device Transferring a program that has been downloaded as a file When your program is being transferred, your micro:bit will pause and you may see the yellow LED on the back flash. Once it’s copied across, your program starts running on your micro:bit.
0/6
BASIC LESSONS
Quick projects to suit all ages, searchable by computing topic, level, coding language and micro:bit feature
0/10
SENSOR LESSONS
Quick projects to suit all ages, searchable by computing topic, level, coding language and micro:bit feature
0/8
CREATOR BIT
The micro:bit Creator:bit Bricks Pack contains 360 degrees servos, the LED strips and almost 200 pieces bricks. Together with the well-designed assembly instructions and courses, it makes the kids learn the coding easily as well as how to build blocks in an interesting way. Let’s start building our kits with the tips!
0/9
Private: Welcome to Micro:bit starter kit
About Lesson

Step 1: Make it

What is it?

Make a simple timer using the new micro:bit’s touch logo sensor.

Introduction

Coding guide

What you’ll learn

  • How to use the new micro:bit’s touch logo sensor to trigger different events when you touch it and when you let go
  • How to use variables, mathematical operators and a system clock to measure time
  • How to convert units (milliseconds to seconds) using mathematical operators

How it works

  • The program times how long in you hold your finger down on the gold logo on the new micro:bit
  • The micro:bit measures how long it’s been switched on in milliseconds (thousands of a second). This is called the running time.
  • The ‘on logo touched’ block senses when you first touch the logo. It shows a heart on the LED display and sets a variable called start to capture the current running time.
  • The ‘on logo released’ block senses when you let go of the logo. The code then subtracts the start time from the new running time. The difference between the running time when you let go and the time when you touched it is the total time you held your finger on the logo. This is stored in a variable called time.
  • The code then converts the time from milliseconds to seconds by dividing it by 1000 and shows it on the LED display.
  • ‘On logo touched’ only triggers when you first put your finger on the logo, unlike the ‘on logo pressed’ block used in the Touch emotion badge project, which behaves like the A and B button and only triggers when you press and let go of the button.

What you need

  • new micro:bit with sound (or MakeCode simulator)
  • MakeCode editor
  • battery pack (optional)

Step 2: Code it

MakeCode

Step 3: Improve it

  • Modify the program so a different icon or your own picture appears when you touch the logo.
  • Add a variable to track the maximum time recorded.
  • Make the timer more accurate by using fractions of numbers instead of integers (whole numbers).