WebUSB

WebUSB is a recent and developing web feature that allows you to access a micro:bit directly from a web page. With MakeCode it allows for one-click downloads to your micro:bit without installing an additional app or other software! It also lets you directly receive data into the MakeCode editor from the micro:bit.

WebUSB support for your micro:bit

If you’re not using a current version of the Chrome or Microsoft Edge browsers, make sure they are this version or newer:

  • Chrome (version 79 and newer) browser for Android, Chrome OS, Linux, macOS and Windows 10.
  • Microsoft Edge (version 79 and newer) browser for Android, Chrome OS, Linux, macOS and Windows 10.

Also, if you have a micro:bit V1 board, make sure that it is running version 0249 or above of the firmware. Upgrading is as easy as dragging a file to a folder and it takes a few seconds to get it done.

  • Check out the instructions to check and upgrade your micro:bit.

Pair your micro:bit

The first time you pair your micro:bit with your computer you’ll need to go through a few easy steps to get setup. Here’s how to get paired with WebUSB:

Download your project

Once you’ve created or opened a project, and you’re ready to download it to the micro:bit, click the Download button at the bottom of the editor window.

Download button and menu

Connect the USB cable

If you haven’t connected it already, connect your micro:bit to your computer with a micro-USB cable. Then, click Next in the message window.

Connect device dialog

Pair the micro:bit with your computer

Another message window will display telling you to pair with the micro:bit device. Click Pair to see to the device list.

Device name dialog

The micro:bit will appear as either BBC micro:bit CMSIS-DAP or DAPLink CMSIS-DAP in the list. Select the device and click Connect.

Device list for WebUSB pairing

Don’t see your micro:bit device?

If you don’t see any devices in the list and the micro:bit is either a V2 board or has the correct firmware version (0249 or above), you can create a support ticket to notify the Micro:bit Foundation of the problem. You can skip the remaining steps.

Device list for WebUSB pairing

You’re connected!

When your micro:bit is connected, you’ll see the Connected to micro:bit message window. Click on Download and you’re project will transfer directly to the micro:bit!

Connected message window

Connection failed?

If the connection to your micro:bit was unsuccessful, you’ll see the Failed to connect message. You can press Try Again to attempt the connection again, download the project as a file instead, or cancel the window and troubleshoot your connection.

Connect failed message window

One-click downloads

Once your micro:bit is paired, MakeCode will use WebUSB to transfer the code directly and you won’t have to drag and drop .hex files from a folder. Just click the Download button in the editor and your project code will just transfer to the micro:bit.

Console output

Another feature of having a WebUSB connection is that MakeCode will be able to detect console output from your micro:bit and display the console output in the editor.

Unpair your micro:bit

If you don’t want to use WebUSB any longer, you will need to unpair your device from the editor to disable the WebUSB connection.

  1. Click on the lock icon in the address bar of the browser.
  2. Uncheck each BBC micro:bit CMSIS-DAP or DAPLink CMSIS-DAP device displayed in the device list.
  3. Reload the MakeCode editor page.

Unpairing from the browser