Swift playgrounds for the micro:bit
Discover how to code the micro:bit in Swift using this interactive book!
What is Swift Playgrounds?
Swift Playgrounds is an app for the iPad that helps teach people to code in the Swift language using interactive 'books'. We've created a book that interacts with the micro:bit wirelessly, helping you to learn the fundamentals of code while having fun with your micro:bit!
To get started with Swift Playgrounds for micro:bit you will need to:
Once you are all set up you can start using the playground!
Get the Swift Playgrounds app
Download and install Swift Playgrounds from the iOS App Store:
(This works on iPads with iOS 11 and newer; iPad Air, Air 2 and 5th-gen iPad. iPad Mini 2, 3, and 4 and all iPad Pros)
Get the micro:bit book
The micro:bit book can be downloaded from within the latest version of the Swift Playgrounds app. From the main screen of the app, scroll down to the 'From Other Publishers' section and tap the 'micro:bit' book:
Tap 'Subscribe' and the book will appear in your subscriptions:
Prepare your micro:bit
The micro:bit will communicate with the iPad wirelessly using Bluetooth Low Energy. As a result you will need to download a 'hex' file and drag it on to your micro:bit (this is called 'flashing').
On a computer with a USB port:
- Connect your micro:bit to your computer using USB
- Download the latest Bluetooth control hex file
- Drag-and-drop the file to your micro:bit to copy it, as described in the USB guide page.
- Your micro:bit is now ready to be used for Swift Playgrounds!
Once your micro:bit is ready you will need to pair it with Swift Playgrounds. Please follow the instructions inside the app to get started.
Using the Playground
The app contains all the instructions you need to get coding! Once you've downloaded the book on your iPad and prepared your micro:bit, open the micro:bit book and tap 'Let's Start Coding'. Tap 'Pair micro:bit' to begin pairing your micro:bit with your iPad.
If you are having issues with our book for Swift Playgrounds, please create a new Support ticket.