Where do you get the BBC micro:bit C++ API library?

I’m building code on the BBC micro:bit in C++ but can’t get hold of the C++ library for the Micro:bit does anyone know where I can get it ?

Hi Simon,

By “the C++ library for the micro:bit” I presume you mean the “Device Abstraction Library”, which is built on top of mbed to abstract bits of the micro:bit - the other higher level languages like TouchDevelop build on top of this DAL, but it also has a nice C++ API.

This lives on github and is developed and owned by Lancaster University. They’re currently working hard on getting it ready for release. Unfortunately they are also currently required to keep it private. It absolutely will be open source, but not until after micro:bits have shipped to students in the UK.

Joe, who leads the work at Lancaster answered this question on the developer.mbed.org site:
Permissions problem when creating new project | Mbed

1 Like

Hi Joe,

Thanks for the reply, Yes that’s what I was after. At least now I know I’m not going mad as I was searching all over the place. I am a STEM ambassador and have a micro:bit supplied by Worcester Uni. I know it’s a bit cheeky but I was wondering if I could have a copy of the DAL to get me into using the processor a bit more. If there was the possibility of something like signing an NDA ?

Regards.
Simon.

Hi Simon,

Thanks for expressing your interest - great to hear that you’d like to join the community here, and also really good to know that some devices are getting down to the hands of STEM ambassadors! :slight_smile:

As Jonny says, we’re currently working round the clock to get the micro:bit abstraction layer ready for open sourcing, so that we can start to support the C/C++ communities as well as the languages on supported on the micro:bit website (Blocks, TouchDevelop, JavaScript etc.). This is an updated and refactored version of the same codebase used to support www.microbit.co.uk and includes all necessary drivers, a component based architecture, lightweight scheduler, eventing mechanism and some managed types to make the experience as simple as possible for users. It’s suitable for use with C or C++.

We’re hoping to be able to release this very soon (matter of days not months), so if you can hang on just a little longer, that would be awesome… If this is an issue for your plans, please get back to me?

– joe

Hi Joe,
Many thanks for the reply. What a great project all this is. Could you tell me where I can go to find when the library will be available?

Regards.
Simon.

I’m assuming it will be published under Lancaster University · GitHub

Please note that you don’t need the C++ DAL, you can use the IDE at http://developer.mbed.org as well as yotta (with target bbc-microbit-gcc) to compile for microbit too. You’ll just need to write your own peripheral drivers (easy for most things, not so easy for the 5x5 LED grid).

Some examples that will work as well on the micro:bit are at GitHub - ARMmbed/ble-examples: BLE demos using mbed OS 3 and yotta..

Yes, I’ve alreasy written c++ code to run on the micro:bit but I what I need is the memory and I/O map for it. Then I can write the drivers. Could you give me a link to this ?

@finneyj Do we have any docs on how the display is working? I would actually want that as well.

Hi @janjongboom

yes, we’ll be releasing docs along with the source - we’re just working on these now along with some testing. We’ll be open sourcing all the drivers for the device too, all compatible with mbed. We will indeed open source via the lancaster-university repo on github, but will also provide yotta modules via the public registry and a library on mbed.org.

. @Malverncoder - sounds cool, we’ll be releasing a full set of mbed drivers along with microbit-dal, but would be great to see you complement this with other good stuff!

@Malverncoder @janjongboom

Guys, just a note to let you know that we opened source the micro:bit runtime C APIs last night…

Code: GitHub - lancaster-university/microbit-dal
Docs: micro:bit runtime

We’ve also sync’d a library on mbed.org too. See the “General->online development” page on microbit-docs for info on how to get going with it.

@janjongboom - there’s API information and some background on the display driver under “uBit->display”

–Joe

1 Like

Hi, Joe
I have a one simple question

DAL is only for TouchDevelop library?
or also micro:python too?