SPI version of the SSD1306 OLED library

Questions and discussion about running MicroPython on a micro:bit board.
Target audience: MicroPython users with a micro:bit.
Post Reply
fizban
Posts: 24
Joined: Mon Oct 24, 2016 2:32 pm

SPI version of the SSD1306 OLED library

Post by fizban » Sat Apr 15, 2017 9:44 pm

I ported my library for the I2C version of the SSD1306 to the SPI version of the OLED display. The SPI version is much faster and the code is more compact. This means that most of the functions fit in one library and we can also use the full resolution of the display (128x64). As an example, I have uploaed also a simplified version of Steve Stagg's bitflyer game. Six cables are needed to connect the microbit and the oled display, but you can buy 6P dupont shells and just remove the housing of standard dupont cables and stick them into the 6P shells to create your own connector. Make sure the wiring links the appropriate pins. Suprisingly, both ends are exchangeable, so no need to remember which side plugs into the micro:bit and which side plugs into the oled display. Just align the VCC pin and you are good to go.

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: SPI version of the SSD1306 OLED library

Post by pythoncoder » Mon Apr 17, 2017 6:38 am

There is an official driver for the SSD1306 which supports I2C and SPI here https://github.com/micropython/micropyt ... ssd1306.py.
Peter Hinch
Index to my micropython libraries.

fizban
Posts: 24
Joined: Mon Oct 24, 2016 2:32 pm

Re: SPI version of the SSD1306 OLED library

Post by fizban » Mon Apr 17, 2017 8:01 am

I have seen several driver versions. Most of them use a Framebuffer, which is not supported by the micro:bit; others does not support text and all of them are too big and too memory consuming for the micro:bit standards. My version is specifically aimed at the microbit, and tries to have a small footprint...

Post Reply