Overview

If you are using an Android device with your micro:bit, we recommend using a USB cable between the device and the micro:bit, if possible (you will need an adapter for this, see details below). The experience is then via your web browser (e.g. Chrome) just like on a computer. 


If you do not have the necessary adapter/cable, then there is a micro:bit app for Android available to download from the Google Play Store. In the app, you can write code in MakeCode and send it to your mobile device over Bluetooth, however there are some feature restrictions in the app.


Please note: If you installed the app before 18 April 2024, please update to the latest version, to access the improvements made in the app.


Unfortunately, currently the Android app does NOT support:

  • Sending code to your micro:bit that was not created in MakeCode
  • Accessing My_Data.htm files created as part of a data logging project (data logging is only available on micro:bit V2s)


For these scenarios, please use a USB cable with the browser-based editors with your Android device (or a Chromebook).



Contents


Using a USB cable with an Android device

The simplest way to work with the micro:bit on an Android device is by using a cable and running the code editor (Microsoft MakeCode or the micro:bit Python Editor) through your web browser as you would on a computer. To do this, you can either:

  • use the micro:bit USB cable provided plus a USB-A to USB-C adapter so that the cable fits into the USB-C socket on your Android device. These adapters are commonly available at a low cost (see what type of USB lead do I need? for more details). 
  • Or get a USB-C to microUSB cable to go directly from the micro:bit to your Android device. These can also be purchased at a low cost from many retailers.

Note: MakeCode in a browser is designed for phone and tablet use, the micro:bit Python Editor is only designed for tablet use. 


USB-A to USB-C adapter

Example of an adapter with (plug) USB-C on one end and (socket) USB-A on the other


microUSB to USB-C cable

Example of a microUSB (top left) to USB-C (bottom right) cable


Transferring a program to the micro:bit using a cable on an Android device


To transfer code from MakeCode or the micro:bit Python Editor using a cable:



  1. Plug in your cable and open https://makecode.microbit.org#editor in a Chrome or Edge browser.
  2. Click on the Download button and select Pair.
  3. A browser pop-up will let you select your BBC micro:bit and then click Connect
  4. Then select Download and the code will transfer to your micro:bit. You may get an additional notification asking if you want to allow your Android device to communicate with the micro:bit.
  5. The first time you do this it may take a bit longer, but subsequent transfers will be faster.


To transfer a hex file using a cable: 


This is the right approach if you have a micro:bit program as a hex file that either cannot be opened in MakeCode or the micro:bit Python Editor. For example, to put the Meet the micro:bit program onto your micro:bit. 


  1. Plug in your cable and download the code from the web. A message will appear at the top of the screen letting you know it has been downloaded. Screenshot showing the Android file downloaded message
  2. Open 'My Files' app on the Android device.Image of the My Files icon.
  3. Navigate to the 'Downloads' folder in the 'My Files' app.Screenshot of My Files with Downloads highlighted.
  4. Find the file you downloaded from the web and long press on it. You should see a checkbox appear on the left of the file and a menu appear at the bottom of the screen. Screenshot of My Files showing a list of downloaded files.
  5. Select the 'Move' option on the bottom menu. This will reveal new menu options at the bottom of the screen.Screenshot showing the 'Move' option selected.
  6. Go back to the main page and navigate to the USB storage menu option (e.g. 'USB Storage 1' in the example below) by selecting it.Screenshot of the main My Files page with USB Storage 1 highlighted.
  7. Select 'Move here' to move the downloaded file into the folder. You should see the file added to the folder.Screenshot showing USB Storage 1 selected, highlighting the Move here option.
  8. Wait for the file to get transferred to the micro:bit. The LEDs on the micro:bit should clear up and a yellow light on the back of the micro:bit should start flashing until the file transfer is complete.



Viewing data logging files (My_Data.htm) using a cable

If you have completed a data logging activity on the micro:bit, use this approach to view the data stored on the micro:bit. This data is stored in a file called My_Data.htm.

  1. You will need a browser app, such as the Chrome web browser, installed on your Android device.
  2. Plug in your cable and open your 'My Files' app on the Android device.Image of My Files icon.
  3. Select the USB storage menu option (e.g. 'USB Storage 1' in the example below).Screenshot of My Files with USB Storage 1 highlighted.
  4. Select the 'MY_DATA.HTM' file to open it. Screenshot after USB Storage 1 is selected, highlighting MY_DATA.HTM file.
  5. 'Open with' options will appear. Find and select the browser app (e.g. 'Chrome') to open 'MY_DATA.HTM' using the browser app. Screenshot of Open with dialogue with Chrome highlighted.

Pairing the micro:bit and the Android device in the app (Android 5-14 only)


The micro:bit app for Android is available to download from the Google Play Store for Android 5-14 devices. Install the app and follow these instructions for pairing and flashing your device.


The Android app may request access to Location services and Storage in order to function properly. Please ensure location services are enabled.



You will need to pair your micro:bit once (per session, if you use different devices or micro:bits). Once paired, you can transfer code to the micro:bit without repeating this step.


To pair the micro:bit with your mobile device you will first need to enter Bluetooth mode:

 

  1. Hold down the A, B and reset buttons simultaneously.
  2. Release the reset button. The LED screen will fill and you should then see the Bluetooth logo, followed by a pairing pattern.


image

Alternatively, for Version 2 micro:bits you can press reset 3 times to enter Bluetooth mode. However, you may need to download to your Version 2 micro:bit once with the app before you can use this method.


You should then see the Bluetooth logo displayed on the micro:bit screen.


Followed by the pairing pattern


3. Copy the pattern into the app


image


4. After tapping PAIR you should receive a success message and a tick/check mark appear on the LED display.




You have now successfully paired the micro:bit. 


Press reset to complete the process


Transferring a MakeCode program to the micro:bit from the app

You will need to have a micro:bit paired before you can transfer a program to it. We suggest checking your micro:bit is paired at the start of each session (if you change device or micro:bit you may need to re-pair). 


Enter Bluetooth mode again each time you want to connect to the app and transfer a program. There are 2 ways to enter Bluetooth mode:


For Version 2 micro:bits*, press reset 3 times - you may need to download to your Version 2 micro:bit once with the app before you can use the triple press method.

Highlighting the reset button on the back of the micro:bit


* on Version 2 micro:bits the gold edge is bumpy, on V1s it is smooth.


Alternatively, this method works on all micro:bits:

  1. Hold down the A, B and reset buttons simultaneously
  2. Release the reset button. The LED screen will fill and you should then see the Bluetooth logo, followed by a pairing pattern.


image


You should then see the Bluetooth logo displayed on the micro:bit screen.


Followed by the pairing pattern


You can either transfer your code via MakeCode or, if you have previously saved it, from the Flash menu:


3a.  Select 'Create code' to enter MakeCode and choose 'Download' inside Makecode (bottom left button in the editor)

 

OR


3b. Open the 'Flash' page in the app and select the file you wish to transfer and choose 'Flash' to start the transfer process




4. When asked if you want to flash the program to the micro:bit, choose `OK`.


The Android screen will show the progress of the file transfer.


On the first, full flash, the micro:bit will also show the progress of the file transfer. If you are only making edits to the same program, subsequent transfers will be much faster.



When the file is transferred, the screen will update to show that the flash has been successful and the program will start running on the micro:bit.


Troubleshooting

Forget previous pairings

If you experience any issues with the app, the first thing you can try is to 'forget' the previous pairings on your android device. Each time the micro:bit is flashed via USB the pairing information is updated, which means the Android device becomes out of date and you have to start the pairing process again.


1. Open Settings > Connected devices > Previously connected devices and tap on  the cog symbol next to your micro:bit device name.
2. Choose  'Forget' and confirm that you want to forget the device.


Direct flashing

Direct flashing is still in development and as such you may experience issues in using it. Here is some troubleshooting advice for using webUSB with the micro:bit and the editors.