Open napperley opened 10 years ago
Yes, it is certainly possible. The original Arduino library that this library is based on supports both SPI and I²C, but I didn't port the I²C code across because I didn't have an I²C display to verify with. I bought one a while ago expressly to test with, but haven't yet done the port, and don't know when I will get a chance to do so. If you feel like contributing let me know - it shouldn't be very hard.
Hi Guy... Have you made any progress on the I2C support? It partially works already. It will occasionally start with pixels all over the screen and then carry on working after a reset. I know it's selfish of me but I've most got I2C displays.
Sorry, haven't got to this yet, but hopefully I will soon.
is this a dead project or does it take years to port the i2c to Raspberry Pi?
Are those the only two options?
no idea, just wanted to use your drivers on my i2c OLED screen, but they're not finished yet, or ever? Would really appreciate if you could port over the i2c drivers though.
Hi, I found your library and it will be nice to get support for I2C displays as well 👍
Hi I wanted to know if they also could be supported because I am running a PizeroW pihole with a 128x32 oled i2c and wanted to also use the library
please let me know if its possible ?
You might try using this fork: https://github.com/sorki/py-gaugette/tree/i2cssd
Hi Guyc I tried but that repo is 6 plus years old and it does not support the SSD1306.SH1106 in python3 . I have two scripts one for the SH1106 working on python3 but it just prints text and the other script is for a sensor so it can display the output to the screen . Do you know how to combine them to work by any chance ?
SH1106 OLED CODE
from luma.core.interface.serial import i2c from luma.core.render import canvas from luma.oled.device import ssd1306, sh1106 import time
serial = i2c(port=1, address=0x3C) device = sh1106(serial, rotate=0)
with canvas(device) as draw:
draw.rectangle(device.bounding_box, outline="white", fill="black")
draw.text((8, 1), "Raspberry Pi Zero W ", fill="white")
draw.text((8, 9), "Temperature:86.6 F ", fill="white")
draw.text((8, 18),"Pressure:30.0 inHg ", fill="white")
draw.text((8, 27),"Pressure:1015.6 hPa ", fill="white")
draw.text((8, 36),"Humidity:30.1 % ", fill="white")
draw.text((8, 45),"Altitude :-18.80 m ", fill="white")
draw.text((8, 53),"Time 9:34am 8/3/19 ", fill="white")
while 1: time.sleep(.1)
###################################################
import board import digitalio import busio import time import adafruit_bme280
i2c = busio.I2C(board.SCL, board.SDA) bme280 = adafruit_bme280.Adafruit_BME280_I2C(i2c)
bme280.sea_level_pressure = 1013.25
bme280.temperature2 = (bme280.temperature 1.8 ) + 32 hectopascals = bme280.pressure pascals = hectopascals 100 inchesHg = (pascals /3386.39) mbar = (inchesHg * 33.8639)
while True:
print("Altitude = %0.2f meters" % bme280.altitude)
time.sleep(2)
Sorry, wish I could help, but I don't have capacity right now.
Although there is support for the AdaFruit Monochrome 128x32 SPI OLED Graphic Display the I2C version isn't supported:
http://www.adafruit.com/products/931
Support is needed for the use of the I2C version in the Beaglebone Black. Is it possible for py-gaugette / gaugette / ssd1306.py module to be adapted to support the I2C version?