Using micro:bit with iOS - connecting via Bluetooth
Connecting your micro:bit to your iOS device allows you to code your micro:bit on-the-go using the official micro:bit app. Use this guide and the extensive help inside the app itself to learn how use the micro:bit with your iOS device!
2: Get the app for iOS
3: Before any kind of Bluetooth communication with the phone or tablet (pairing or flashing), enter pairing mode
4: Pair your micro:bit with the app using 'Choose micro:bit'
5: Start coding! Now you can re-program your micro:bit via Bluetooth.
Key tips for success:
- You should always enter pairing mode before trying to flash/program your micro:bit over Bluetooth
- Every time you program the micro:bit over USB it is fully erased, including pairing information. Therefore you must forget it iOS Settings-->Bluetooth and pair again.
What can I do with the iOS app?
The micro:bit app allows you to connect to your micro:bit from your phone or tablet, then create code and send it straight to your micro:bit. You can use the app to create code in the MakeCode editor (powered by Microsoft MakeCode), but unfortunately, Python and Bluetooth cannot be used together.
You can also use the new 'Monitor and Control' section to watch the state of your micro:bit, and even trigger actions like button presses from your iOS device
The app has five sections:
- Choose micro:bit is where you go to pair/connect your phone/tablet (device) to your micro:bit
- Create Code takes you directly to the MakeCode editor (powered by Microsoft MakeCode) where you can write your own programs and then download them to the micro:bit, just as if you were on a PC
- Flash is where you go to send a code file (.HEX) from your device (phone/tablet) to your micro:bit
- Monitor and Control allows you to observe real-time data from the micro:bit sensors, send messages directly to the LEDs and control the micro:bit buttons and pins from your iPad or iPhone. (Monitor is ideal for exploiting Bluetooth services in real-time, and for de-bugging your program code.) These facilities are only available if you have added Bluetooth services these to your program, or use one of the samples like ‘monitor-services’ in the 'Flash' page of the app.
- Ideas takes you to the micro:bit website where you can get ideas and examples from other people
How to 'pair' the micro:bit
'Pairing' is when you set up a connection between your micro:bit and your iOS device. The app searches for your micro:bit using using a unique pattern, and may prompt you for a passcode, if you are using an older program, or have configured Passcode Pairing in MakeCode
- Before pairing, download this HEX file and copy it onto the micro:bit via USB. It will update the Bluetooth pairing software on the micro:bit to the latest version and run through the instructions for entering pairing mode.
- You enter pairing mode by holding down buttons A+B and pressing, then releasing the reset button on the back of the micro:bit while still holding A+B. Check out the video just above to learn more about pairing the micro:bit.
When you program the device over USB it will completely erase the previous program and settings, including any pairing information. This means that you will have to 'forget' your micro:bit in Settings->Bluetooth on your iOS device after each USB programming. You do not need to do this if you are only using Bluetooth to program your device.