Before we get started, let’s go over how to set up your micro:bit device.
You will need
BBC Micro:bits device
USB to micro usb connector cable
Computer or mobile device with a working Internet connection
Some useful links and micro:bit documentation can be found at the bottom of this page
Step 1:
Open a browser and navigate to makecode.microbits.org.
This is where you will be telling your micro:bit what you want it to do with a set of instructions called programs.
Step 2:
Click on “New Project” to access the editor and give your project a fun name.
The editor is where we will be writing instructions, using Blocks to drag and drop instructions about what we want the micro:bit to do. The editor also gives you access to a virtual version of your micro:bit so you can test that your program works before sending it to your micro:bit.
Step 3:
After we write a program, all that’s left is to give those instructions to your micro:bit.
Click on download to save a file of your program to your computer.
Your program is now saved as a .hex file, which translates your program into instructions that your micro:bit can understand.
Step 4:
Connect your micro:bit to your computer using the USB cable in your kit.
When you connect your micro:bit to your computer, it will show up as a memory drive with the name “MICROBIT”. Here is where we will be adding your program.
Step 5:
Locate your program file that you saved earlier. Usually this file will get saved to your computer’s downloads folder.
Step 6:
Drag and drop your program file to the micro:bit and wait for it to stop flashing. Once it’s done then your program will automatically start running and you can test out your project.
Another option to send programs to your micro:bit is by pairing your micro:bit device and downloading your program from the editor. However, this option will not save a copy of your program and it will overwrite any changes you make so use this option carefully.
Whether you pair your micro:bit or drag and drop your file into it, your micro:bit can only run one program at a time. This means that every time you give your micro:bit a new file, it will replace the current program with the new one you just added.
The files in the makecode editor will not stay saved forever either. According to the makecode support website, "projects are stored in the browser's cache...If this cache is cleared, then MakeCode projects will be removed."
For this reason, it’s a good idea to create a folder on your PC to save all your .hex code files so you do not lose them forever.
Since the micro:bit is the brains to all of these tutorials, check out the following images to get more familiar with the sensors, inputs and other features your micro:bit has.
For more detailed information on the micro:bit, visit the micro:bit user guide
To see a detailed view of the circuitry, visit the micro:bit circuit schematics
After going through all of these tutorials the fun doesn't have to stop there. Below we have provided you with some links on other projects that will hopefully inspire you above and beyond what we have taught you.