Lesson 1 – Setting up the microbit

Learning Objectives

  • Understand how to use the BBC Microbit device
  • Develop some simple programs to run on the Microbit

Learning Outcomes

All must know how to use the Microbit safely.  With help, be able to set it up and download a program to it.  With help use the Block Editor to produce and run programs that can make an image appear, change images if the buttons are pressed and make an image flash. (Level 3)

Most should know how to use the Microbit safely.  Be able to set it up and download a program to it.  Use the Block Editor to produce and run programs that can make an image appear, change images if the buttons are pressed and make an image flash. (Level 4)

Some could know how to use the Microbit safely.  Be able to set it up and download a program to it.  Use the Block Editor to produce and run programs that can make an image appear, change images if the buttons are pressed and make an image flash.  Be able to adapt the programs to do more than is specified on the lessons. (Level 5)

Keywords

Words to learn: Microbit, microcontroller, download, program, reset

Starter

Click here to watch a video which explains what the BBC Microbit is.

Click here to watch a video which show you what the different parts of the Microbit are.

Finally, click here to read important safety information about the Microbit.

Main

OK, let’s get started.  You will be given the BBC Microbit device, a short USB cable and an (empty) battery pack.  The Microbit is reasonably tough, but please be careful when you are handling it – try not to drop it and be careful when plugging or unplugging cables.

Plug the small end of the USB cable into the USB socket on the top of the Microbit – it will only go in one way so don’t force it, check you’ve got it the right way round!

plugging_in1 plugging_in2

Plug the large end of the USB cable into a USB socket on your computer – your teacher will show you where this is.

connect_m8_computers carol_alison_usb adams_usb

When you plug it in the yellow light next to the USB power will light up to tell you the Microbit has power.  You may also see the red LEDs on the back light up as it runs a demo program.

Let’s get started.  Click this link to load up the Microsoft Block editor.

microbit_env

Drag out the “show leds” block from the Basic category on the left hand side.  Put ticks where you’d like an LED to light up.  Click the Run button to see if it works on the emulated Microbit on the right hand side of the screen:

microbit_run

If it works, time to download it to your Microbit.  Click the Compile button.  After a few seconds you will notice that Google Chrome downloads a .hex file.  This will save into your H: drive (your home drive) and in the Downloads folder.  Go to your Downloads folder and find the .hex file:

hex_file_hdrive

Right click it and choose Cut.  Go to the Start Menu and choose Computer.  It should look like this:

microbit1

Double click on the Microbit icon.  Right click and choose Paste.  You should notice that the computer copies the file and the yellow light on your Microbit will go off.  The Microbit will then restart and it should be running your program.

Try out this activity and then the challenges where you will create programs that creates a smiley face which changes to a sad face when you press a button.

Try out this activity and then the challenges where you will create a flashing image.

Plenary

You can also use your Microbit away from the computer.  The battery pack you have been given takes two AAA batteries (alkaline batteries are the best to use).  This connects to the connector at the top right hand side of the Microbit (make sure you disconnect the USB cable first).  You can then take it and run your programs anywhere!