How to Transfer Your Code to a Physical Micro:bit

In this article, you will learn how to transfer your code to a micro:bit robot.

Last updated - July 10, 2023

 

Using the micro:bit USB cable, you can connect the micro:bit directly to the platform and follow the on-screen instructions, or you can download a file and transfer it to the micro:bit manually. 

Connecting Your Micro:bit

  1. Click the three dots ... to the right of the download button at the bottom of the screen.
  2. Click "Connect device."
    connect with arrows
  3. Connect your micro:bit cable to both your micro:bit and your computer.
    image (3)
  4. Read the instructions and click "Next" to continue.
    image (4)
  5. In the second box that pops up, the micro:bit will either be named "BBC micro:bit CMSIS-DAP" or "DAPLink CMSIS_DAP." Select the micro:bit name and click "Connect."
    image (5)
  6. Now your micro:bit is connected! To download code to the micro:bit, click the "Download" button at the bottom of your screen.
    microbit download

  7. A light will flash on the micro:bit when the program starts transferring from your computer.
  8. Once the light stops flashing, the file is finished transferring and the program can be run on the micro:bit!

Manual Approach

  1. To manually transfer your code to the micro:bit, click the "Download" button at the bottom of your screen. This will download the code as a .hex file.

    microbit download

  2. Plug one end of the USB cable into the micro:bit and the other end into your computer.
  3. Look for a folder that says "MICROBIT."
    image (10)
  4. Drag the .hex file from your downloads folder to the micro:bit folder.
    image (12)

  5. A light will flash on the micro:bit when the program starts transferring from your computer.
  6. Once the light stops flashing, the file is finished transferring and the program can be run on the micro:bit!

For a video tutorial, click here.