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 appropriate cable or 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:
- 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
Transferring a program to the micro:bit using a cable
Viewing data logging files (My_Data.htm) using a cable
Pairing the micro:bit and the Android device in the app
Transferring a MakeCode program to the micro:bit from the app
Troubleshooting
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.
Example of an adapter with (plug) USB-C on one end and (socket) USB-A on the other
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:
- Plug in your cable and open https://makecode.microbit.org#editor in a Chrome or Edge browser.
- Click on the Download button and select Pair.
- A browser pop-up will let you select your BBC micro:bit and then click Connect.
- 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.
- 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.
First, download the code from the web. A message will appear at the top of the screen letting you know it has been downloaded.
Second, use your cable to connect the micro:bit to your phone.
After, there are two ways to transfer the downloaded hex file to the micro:bit.
Using our online micro:bit WebUSB hex file flashing tool
- Visit https://microbit.org/tools/webusb-hex-flashing/ on your phone’s browser.
- Click on the “Drag and drop a hex file…” zone. Allow permissions if asked, click on the “Files” option, and select the hex file you would like to flash.
- Once a file is selected, click “Send to micro:bit” button to send the program to the micro:bit.
Click the “BBC micro:bit…” option and click “Connect” on the dialog.
Wait for the file to get transferred to the micro:bit until you see "Flash complete".
Manually transferring the hex file to the micro:bit directory
Unfortunately this method may not work for older versions of Android and for micro:bit V2 only.
- Open 'My Files' app on the Android device.
- Navigate to the 'Downloads' folder in the 'My Files' app.
- 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.
- Select the 'Move' option on the bottom menu. This will reveal new menu options at the bottom of the screen.
- 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.
- Select 'Move here' to move the downloaded file into the folder. You should see the file added to the folder.
- 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.
- You will need a browser app, such as the Chrome web browser, installed on your Android device.
- Plug in your cable and open your 'My Files' app on the Android device.
- Select the USB storage menu option (e.g. 'USB Storage 1' in the example below).
- Select the 'MY_DATA.HTM' file to open it.
- 'Open with' options will appear. Find and select the browser app (e.g. 'Chrome') to open 'MY_DATA.HTM' using the browser app.
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:
- Hold down the A, B and reset buttons simultaneously.
- Release the reset button. The LED screen will fill and you should then see the Bluetooth logo, followed by a pairing pattern.
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
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.
* on Version 2 micro:bits the gold edge is bumpy, on V1s it is smooth.
Alternatively, this method works on all micro:bits:
- Hold down the A, B and reset buttons simultaneously
- Release the reset button. The LED screen will fill and you should then see the Bluetooth logo, followed by a pairing pattern.
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.
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.