Ora

How do I download Microbit MakeCode?

Published in Micro:bit Programming 3 mins read

To download a program from the Micro:bit MakeCode editor to your micro:bit, you simply connect your micro:bit to your computer and then click the 'Download' button within the MakeCode editor to transfer your compiled program (a .hex file) directly to the device.

How to Download a Program from the Micro:bit MakeCode Editor to Your micro:bit

The Micro:bit MakeCode editor is a fantastic online platform for coding your BBC micro:bit using block-based programming, JavaScript, or Python. Once you've created your project, getting it onto your micro:bit is a straightforward process.

What You'll Need

Before you begin, ensure you have the following:

  • A BBC micro:bit: The small, programmable computer.
  • A USB A-to-Micro B cable: This is the same type of cable often used for charging older smartphones or powering small devices.
  • A computer with a web browser (e.g., Chrome, Firefox, Edge) and internet access.
  • Your finished or in-progress MakeCode project.

Step-by-Step Guide to Downloading Your Program

Follow these steps to transfer your MakeCode program to your micro:bit:

  1. Connect Your micro:bit to Your Computer:

    • Plug the smaller (Micro B) end of your USB cable into the micro:bit's USB port.
    • Plug the larger (USB A) end into an available USB port on your computer.
    • Your computer should recognize the micro:bit as a USB flash drive, typically named "MICROBIT" or "MBED".
  2. Access the MakeCode Editor:

    • Open your web browser and navigate to the official Micro:bit MakeCode editor.
    • Open the project you wish to download or create a new one.
  3. Initiate the Download:

    • Once your code is ready, locate the purple 'Download' button in the lower-left corner of the MakeCode editor screen.
    • Click this button.
  4. Save the .hex File:

    • Your browser will download a file with a .hex extension (e.g., microbit-YourProjectName.hex) to your computer's default downloads location. This .hex file is the compiled version of your program.
  5. Transfer the Program to Your micro:bit:

    • Open your computer's file explorer (Finder on macOS, File Explorer on Windows).
    • Navigate to your 'Downloads' folder (or wherever your browser saves downloaded files).
    • Locate the .hex file you just downloaded.
    • Drag and drop this .hex file onto the "MICROBIT" drive that appeared when you plugged in your micro:bit.
  6. Program Execution:

    • During the transfer, the yellow LED on the back of your micro:bit will flash rapidly.
    • Once the flashing stops, the transfer is complete, and your new program will automatically start running on your micro:bit.

Important Notes and Troubleshooting Tips

Issue/Tip Description
USB Cable Quality Use a good quality USB cable. Some cables are "charge-only" and do not support data transfer, which is essential for flashing your micro:bit.
"MICROBIT" Drive Not Appearing If the "MICROBIT" drive doesn't show up, try a different USB port, a different cable, or restart your computer. Ensure your micro:bit is powered.
Outdated Firmware Occasionally, your micro:bit's firmware might be outdated. Visit the micro:bit support page for instructions on updating it.
Download Folder Access If you have trouble finding the .hex file, check your browser's download settings to confirm the default download location.
No Program Running After transferring, if the program doesn't run, check the micro:bit for power (via USB or battery pack). Ensure your code in MakeCode is correct and free of errors.

By following these steps, you can easily get your creative MakeCode projects running on your micro:bit, bringing your code to life.