This beginner's microbit user guide is a no-frills, straight to the point, collection of essential knowledge. It’s not everything you need to know, but everything up to step 5 is everything you need to know right now. The good news is, you can do it!
We’re going to learn how to get the micro:bit ready for use and how to write a couple of programs and then run them on the micro:bit. There is plenty more to learn than is covered here, so once you've learned the basics you can also follow the links at the end of this guide to continue learning. Let’s get cracking...
In This microbit User Guide You Will Learn:
- How to power the micro:bit.
- Connecting the micro:bit to your computer.
- How to write code for the micro:bit with MakeCode.
- Writing a simple program.
- How to load the program onto the micro:bit.
- Writing another program.
- Loading the second program onto the micro:bit.
- What to learn next.
You Will Need:
- A micro:bit.
- USB Lead.
- Or a micro:bit starter kit. It comes with micro:bit, USB lead, Battery Pack and also Batteries.
- A computer with an internet connection.
How Do You Power The micro:bit:
There are several methods for powering the micro:bit, for the sake of keeping it simple we will look at two of them. You can power the micro:bit by connecting it to your computer via USB or by using an external power supply such as a battery box. The section at the end of this guide will contain links to information covering other methods.Method one:
Good news! The USB ports on your computer will provide all the power you need to use the micro:bit to run programs. Provided the micro:bit isn’t connected to other devices and you don’t need to be mobile, this method is all you need to get up and running.Method two:
If you bought the Starter Kit there is more good news! The kit comes with a handy battery cage and batteries that plug into the JST connector on the micro:bit. This will not only supply power to the micro:bit when it's not connected to a computer, it will also enable you to go mobile!How Do You Connect The micro:bit To Your Computer:
To connect the micro:bit to a computer, find an unused USB port on your computer and then plug in your USB cable. Then, connect the other end of the USB cable to the micro:bit and you are good to go. When connected to your computer, the micro:bit behaves as if it is a removable drive. Just like an actual removable drive, it shows up in File Explorer and it can have files dragged and dropped onto it. Unlike a removable drive, you cannot remove files from the micro:bit. Loading a new program onto the micro:bit overwrites the last program that was loaded onto it.How Do You Write Code For micro:bit With MakeCode:
Writing code for the micro:bit is mostly a case of finding the block you need in the menu and dragging it and dropping it into the workspace. The blocks are joined together to form a program. Once you have all the blocks you need, your program is complete! Let’s experiment.- Open MakeCode in your browser.
- Click on the New Project tile.
- Then, click on the Basic menu, then click and drag a block into either the On Start block or the Forever block.
Writing A Simple Program:
We are going to create a simple program to run on the micro:bit. The image above shows the code we are going create. The aim is to display a beating heart on the micro:bits LED matrix. Everything we need is in the Basic menu. So, let’s head back over the MakeCode editor and create our program.- Open MakeCode in your browser.
- Click on the New Project tile.
- Get the show icon block from the Basic menu and then put it in the forever block.
- Then get the pause (ms) block and place it below the show icon block in the forever block.
- Click on the pause value and change it 1000. (1000ms = 1 second)
- Select the Basic menu and then on the more menu that appeared below the Basic menu.
- Get the clear screen block and place in between the show icon block and pause (ms) block.
How Do You Load A Program Onto A micro:bit:
You load a program onto the microbit by connecting the micro:bit to a computer, then download the program to your computer, and then drag and drop the file onto the micro:bit in File Explorer. Let’s step by step!- Connect your micro:bit to a spare USB port on your computer.
- Locate the Download button in the bottom left of the editor.
- In the box next to the button type in Valentines as the name for your program.
- Click the Download button.
- Locate the Valentines.hex in your default Downloads folder using File Explorer.
- In File Explorer, you will also see the micro:bit showing up as a drive.
- Pick up the file and then drop it directly onto the micro:bit in File Explorer.
Let’s Write Another Program (because, why not!):
The micro:bit has a ton of things, like sensors and an edge connector, that can be explored in some of our other guides. For now, we would be remiss if we didn’t also show you how to make something happen with a button press.- Click the Home icon in the top left of the MakeCode editor.
- Then click the New Project tile.
- Drag the on button A pressed container from the Input menu into the workspace.
- Place a show icon block inside it.
- Click on the heart and change it to a smiley face.
- Right-click the on button A pressed block and then select Duplicate from the menu. (the new block will be greyed out.)
- Click on the A on the block and then change it to a B. (the block will no longer be greyed out)
- Then click on the smiley face in the new block and change it to a sad face.
- Name your program.
- Then hit the Download button.
Loading The Second Program Onto The micro:bit:
To get our new program onto the micro:bit, we follow exactly the same steps as we did for the first program. Once you've dragged the new program onto the micro:bit, this program will then overwrite your previous program. The micro:bit can only hold one program at a time. If you want to run your first program again, find it in your Downloads folder, then drag it and drop it onto the micro bit. Pro Tip: Create a folder on your hard drive to keep all of your code safe. Then. move the programs you want to keep from your Downloads folder. This will make accidental deletion much less likely.Where do I learn More About The microbit:
The best place to learn about the micro:bit is the Kitronik University micro:bit page. All of the learning resources listed there are free, with no sign-ups required. There are guides covering everything from basic coding advice up to more advanced Robotics guides, and everything in between. It is, however, a daunting list, so we've listed a few key resources to serve as a Next Steps springboard.- What is the BBC micro:bit.
- Getting Started with MakeCode Editor.
- Powering your BBC microbit.
- The Five Minute microbit Guide.
- The Parent's Complete Guide To The BBC micro:bit.
- Controlling Movement On The LED Matrix With User Input.
©Kitronik Ltd – You may print this page & link to it, but must not copy the page or part thereof without Kitronik's prior written consent.