adafruit / Adafruit_Python_SSD1306

Python library to use SSD1306-based 128x64 or 128x32 pixel OLED displays with a Raspberry Pi or Beaglebone Black.
MIT License
542 stars 283 forks source link

0.84" support? #2

Closed larsbo closed 9 years ago

larsbo commented 9 years ago

Does the library spport this OLED display with 96x16 pixel: http://www.amazon.com/SainSmart-Serial-96X16-Module-Arduino/dp/B00MQM4MK4? It also uses the SSD1306 IC.

tdicola commented 9 years ago

Unfortunately not out of the box, but it might not be too hard to make work. There's a class for each size display, like SSD1306_128_64 for a 128x64 display or SSD1306_128_32 for a 128x32 display. Each of these classes inherits from an SSD1306Base class and just implements an _initialize function that sends the right commands to initialize each display. To make the 96x16 work you would probably need to create your own class like the SSD1306_128_64, etc. classes and give it an initialization function. Check out the code here if you're curious: https://github.com/adafruit/Adafruit_Python_SSD1306/blob/master/Adafruit_SSD1306/SSD1306.py