MicroPython Device Drivers for BBC micro:bit
Introduction
This website presents a host of MicroPython drivers, all for the BBC micro:bit. It is an ever increasing collection. Each driver has been tested on the micro:bit V2 that is hooked up to the device the driver has been written to control.
The driver code contains basic error checking. However unlike the compiled code drivers written e.g. for the Arduino platform, catching and dealing with exceptions in this MicroPython driver collection is largely left to the user program. MicroPython is a compiled language and lengthy routines performing error checking that may never be used would seriously impact available Flash memory.
These drivers are free for you to copy, use and enjoy. While each driver has been extensively tested with the micro:bit interfaced to the device, there is no warranty and you use the code at your own risk.
Alphabetical Listing of Available Drivers
Following is an alphabetical list of the MicroPython device drivers written specifically for the micro:bit. Each driver webpage provides the code, a full description on how to connect the device to the micro:bit and full documentation on public methods including code examples.
- AHT10, AHT15 Weather Station Sensor (relative humidity, ambient temperature, I2C interface)
- AHT20, AHT21 Weather Station Sensor (relative humidity, ambient temperature, I2C interface)
- AHT30 Weather Station Sensor (relative humidity, ambient temperature, I2C interface)
- DS1302 Real-Time Clock (date, time, SPI interface)
- DS1307 Real-Time Clock (date, time, alarms, I2C interface)
- DS3231 Real-Time Clock (date, time, alarms, I2C interface)
- Logic Gate Tester (tests 1, 2, 3 and 4-input logic gates)
- MB85RC256V FRAM Memory (32KB, I2C serial interface)
- OpenLog (data logger, UART serial interface)
- PCF8563 real-Time Clock (date, time, alarm, countdown timer, I2C interface)
- SHT40, SHT45 Weather Station Sensor (relative humidity, ambient temperature, I2C interface)
- TCA9548A I2C multiplexer (8-channels, I2C interface)
- TM1637 LED 7-segment (4-digit LED display, proprietary serial interface)