The microbit User Guide For Absolute Beginners

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:

  1. 1. How to power the micro:bit.
  2. 2. Connecting the micro:bit to your computer.
  3. 3. How to write code for the micro:bit with MakeCode.
  4. 4. Writing a simple program.
  5. 5. How to load the program onto the micro:bit.
  6. 6. Writing another program.
  7. 7. Loading the second program onto the micro:bit.
  8. 8. What to learn next.
 

You Will Need:

   

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:

The microbit User Guide For Absolute Beginners connecting to a computer 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:

The Absolute Beginners microbit User Guide starter kit powerIf 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:

The microbit User Guide For Absolute Beginners connectTo 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:

The microbit User Guide For Absolute Beginners coding gif 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.
If you look through the menus, you’ll notice that there are a variety of different shaped blocks. This is to help you connect blocks together in an appropriate way. Have a go at dragging blocks into the workspace and then at joining them together. You may also notice that most blocks need to be placed into a container such as the Forever block. If you just drag and drop these blocks into the workspace without putting them in an appropriate container, they will then be greyed out, which means they will not be executed when you run a program.    

Writing A Simple Program:

The microbit User Guide For Absolute Beginners beating heart code 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.
You should now have a beating heart being displayed on the simulated micro:bit in the editor! Experiment with different values in the pause (ms) block. Note: You can either select a value from the drop-down list or type in a custom value.    

How Do You Load A Program Onto A micro:bit:

The microbit User Guide For Absolute Beginners file explorer 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.
The file you downloaded will be in your default Downloads folder. Now we need to get it onto the micro:bit.
  • 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.
If you watch the back of the micro:bit you will see an orange light flashing. This lets you know that the file is being transferred. Then, once the flashing stops, your program should begin to run on the micro:bit and you should see the flashing heart on the LEDs.    

Let’s Write Another Program (because, why not!):

The microbit User Guide For Absolute Beginners button press code 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:

The microbit User Guide For Absolute Beginners loading code 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.   Finally, make sure you don't miss out on any other new free learning resources by signing up for our newsletter here.

Leave a comment

All comments are moderated before being published