I2C and SPI on the micro:bit; additions to the babelboard range
micro:bit Keypad using I2C+ MC23008 |
The I2C and SPI protocols allow single board computers like the micro:bit, the Raspberry Pi and Jetson Nano to drive hundreds of different types of useful peripheral chips.
There are lots of widely available drivers for the Raspberry Pi, the Arduino and Adafruit boards. I've seen fewer for the micro:bit, and I have started writing some more as part of my babelboard project. I am also building a babelboard for the micro:bit.
The babelboard project
Babelboards allow you to connect a range of I2C and SPI devices to several popular single board computers.
The image on the right shows an mcp23S08 reading a hex keypad driven by a micro:bit using SPI.
The micro:bit babelboard allows you to connect Grove I2C devices and the Quick2Wire port expander and analog boards. You can get adapters that connect Grove to Qwiik, so you can also connect the range of Qwiik devices to the micro:bit. Planned enhancements will make it easy to connect to the Pimoroni breakout garden range, and the Adafruit STEMMA/STEMMA QT ranges.
A babelboard for the Jetson Nane |
Existing babelboards allow you to connect I2C and SPI peripherals to the Raspberry Pi, the Jetson Nano and Adafruit feather range. Since the Adafruit Clue has a micro:bit compatible pinout you'll be able to connect to that as well.
Most of these exist as prototpyes at present, but the designs are Open Source and I'll be publishing them as part of the babelboard hardware project. Some use stripboards, some use Adafruit permaProto boards, and a growing number use custom PCB designs created in Fritzing or KiCAD.
Connecting the hardware is not much use without software to drive it. If the the computer you're using supports CircuitPython or Adafruit Blinka you've got all you need to start using any device included in the CircuitPython library.
I'll be adding code to drive things from the micro:bit as time permits, and I'll also be adding code for more of the Grove peripherals.
Comments
Post a Comment