Compatibility layer for Adafruit CircuitPython drivers on Micropython

Discussion about programs, libraries and tools that work with MicroPython. Mostly these are provided by a third party.
Target audience: All users and developers of MicroPython.
Post Reply
Posts: 224
Joined: Tue Aug 09, 2016 10:58 am

Compatibility layer for Adafruit CircuitPython drivers on Micropython

Post by cefn » Wed Mar 07, 2018 2:43 pm

As many of you know, CircuitPython is an Adafruit-commissioned remix of Micropython.

I don't speak for Adafruit, but I understand the differences are about being more accessible and easy for learners (sometimes at the cost of performance or relevance for 'industrial' use cases). Currently CircuitPython is maintained for the target platforms which Adafruit ships (see ) meaning there are Micropython platforms for which no CircuitPython build is available.

Alongside CircuitPython, Adafruit supports learners also by commissioning and maintaining a whole load of hardware drivers (see e.g. ... es/drivers ) which do not run on Micropython, and which would need specialist work to fork a Micropython flavour.

Adafruit commissioned some of my time to experiment with a proof-of-concept compatibility layer, called adafruit-blinka ( the name of the CircuitPython snake ) which might allow CircuitPython driver code to run directly on a Micropython official build. Assuming your application can accept the marginal increase in RAM, flash and processor overhead, a stable compatibility layer would give Micropython users the benefit of using tested CircuitPython modules without modification.

This is just an informal announcement that early experimentation is positive. I have learned it may be possible to run nearly all CircuitPython code on a Micropython official build, with several drivers having been proven to work with the proof-of-concept compatibility layer. At this stage, interested experimenters working in education who are willing to put up with very beta code might be able to offer feedback or contributions to achieve the CircuitPython conformance which they need for their projects on Micropython platforms.

Currently, there is support for Pin enumeration, I2C and UART support, but as-yet-untested SPI support. You can engage with the public Github repo at

Posts: 288
Joined: Sun May 04, 2014 8:54 am

Re: Compatibility layer for Adafruit CircuitPython drivers on Micropython

Post by Turbinenreiter » Wed Mar 07, 2018 7:14 pm

This is truly a great move to battle the drawbacks of forking.

User avatar
Posts: 3367
Joined: Fri Jul 18, 2014 8:01 am
Location: UK

Re: Compatibility layer for Adafruit CircuitPython drivers on Micropython

Post by pythoncoder » Thu Mar 08, 2018 6:22 am

Agreed. :D
Peter Hinch

Posts: 64
Joined: Wed Jul 20, 2016 12:08 pm

Re: Compatibility layer for Adafruit CircuitPython drivers on Micropython

Post by fpp » Thu Mar 08, 2018 6:55 pm

Great move indeed, if it walks the whole mile !

Adafruit have invested hugely in CircuitPython, not only in the software itself but in its documentation and user support.

Enough at least to give the impression that the original micropython has been stagnating in comparison (not being backed, of course, by a comparable business activity).

So this specific way of "giving back to the upstream" could be seen as a win/win, bolstering both the micropython ecosystem and Adafruit's standing in the community.

Stock up the popcorn :-)

Posts: 38
Joined: Fri Mar 22, 2019 12:13 pm

Re: Compatibility layer for Adafruit CircuitPython drivers on Micropython

Post by Picasso » Fri Mar 22, 2019 12:24 pm

The idea of "giving back upstream" is good. The way to do that is by submitting pr's in the upstream repo's. The compatibility layer sounds nice, but any incompatiblity that exists is created by Adafruit per definition. That is were the incompatible code comes from. I simply cant stop this sense of utter hypocrisy I got from the Adafruiteers that are reasoning like this.

The proper way to do this (if adfaruiteeers would be interested at all) is to simply make the drivers available for MicroPython, tested and all, and have some adaption layer for CircuitPython. That way, MicroPython receives the respect it deserves. If Adafruit did that, than they can talk, with their backs straight, and say : "Look, we are giving back upstream!".

Post Reply