Y'all can follow our simple guide in the Quick Start department of the website.  The process of transferring code is chosen Flashing. Once the micro:bit has been flashed, the lawmaking volition run automatically.

The micro:flake can only run i program at a time - every time you drag-and-drop a hex file onto the device over USB it will erase the current programme and supercede it with the new 1. If you want to reset your micro:bit to it'southward 'out of the box' state, wink the original .hex file that came with your device.

To flash the plan via the USB connection, you'll demand the following things:

  • A Micro USB cable to connect your figurer to your micro: fleck.This is the same cable that is normally used to connect a smartphone to a computer (make sure that it can transfer data every bit well as power).
  • A Computer running Windows seven or later, Mac OS X ten.half dozen or later, Linux or Chrome OS
  • Access to the Internet

Stride ane: Connect your BBC micro:bit to your computer

  1. Connect the small end of the USB cable to the micro USB port on your BBC micro:chip
  2. Connect the other end of the USB cable to a USB port on your computer.

On computers running Windows, MICROBIT appears as a drive under Devices and drives.

On a MacMICROBIT appears every bit a new drive under Devices.

On a Chromebook MICROBIT will appear as a new device in file director On LinuxMICROBIT will be mounted equally a drive eg at /media/pi/MICROBIT

Step two: Compile your program

Compiling translates code from loftier level programming languages like Javascript and Python to low level machine code that the micro:scrap can interpret. When yous download a file from 1 of the editors, it is compiled in the browser and downloaded as a .HEX file.

Using the editor of your choice, select download  and if prompted, choose to save the compiled file on your computer (or anywhere other than the BBC micro:fleck).

Windows Edge


Select Download. When asked what to do with this file, select Save and information technology will be saved to your Downloads folder. Selecting Open Folder will allow you to view your downloads

Mac Safari


When yous select Download in Safari, your file will apppear under downlaods in the elevation right of the screen, you tin can open up your downloads folder from here.

Chrome

This is the same process on Windows and Mac. Select Download and your .hex file will appear equally a download at the bottom of the browser.

Right click on the download and select show in folder.

Step 3: Wink the file to your BBC micro:bit

 The process of transferring the .HEX file to the BBC micro:bit is chosen flashing. To flash the file, simply drag and drop it on to the micro:bit drive from the file explorer or finder window. Here's a video of the process


  • The LED on the back of your BBC micro:chip flashes during the transfer (which should only take a few seconds).
  • Once transferred, the lawmaking will run automatically on your BBC micro:bit. To rerun your program, press the reset button on the back of your BBC micro:fleck. The reset button automatically runs the newest file on the BBC micro:bit.
  • By copying the program onto the 'MICROBIT' drive, y'all take programmed information technology into the flash retentiveness on the micro:chip, which ways fifty-fifty after yous unplug the micro:fleck, your program volition nonetheless run if the micro:bit is powered by battery.

Troubleshooting

  • You can't drag and drop more than than one hex file at one time onto your micro:bit. If you try to elevate and driblet a second hex file onto your micro:flake before the get-go file has finished downloading, then the second file may fail in unlike ways.
  • When the first program has been written to the micro:bit, the drive will eject. If y'all drag and drop a second file at this point information technology may non discover the drive and the second write will fail.

The errors may look like this:

Windows

Mac

Or it may appear that there are two hex files on your BBC micro:bit so the micro:flake won't be able to run multiple files. To rectify this, unplug your micro:chip and plug information technology in again. Make certain that your micro:bit appears as a MICROBIT drive and not MAINTENANCE.

Further information

Here are instructions for the MakeCode Editor using different browsers on Windows and Mac computers. Choose the one you're using:

Windows browsers

  • Microsoft Edge
  • Internet Explorer
  • Chrome
  • Firefox

Mac browsers

  • Safari
  • Chrome
  • Firefox
  • If y'all're using the device in a school environment, you may need to bank check with your network ambassador that you accept the right permissions to write to the device.
  • Yous can only transfer one hex file at a time onto your BBC micro:bit.

You tin can likewise transfer lawmaking via Bluetooth.