Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support For AdaFruit Monochrome 128x32 I2C OLED Graphic Display #11

Open
napperley opened this issue Apr 22, 2014 · 12 comments
Open

Support For AdaFruit Monochrome 128x32 I2C OLED Graphic Display #11

napperley opened this issue Apr 22, 2014 · 12 comments

Comments

@napperley
Copy link

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?

@guyc
Copy link
Owner

guyc commented Apr 26, 2014

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.

@domgiles
Copy link

domgiles commented Jun 1, 2014

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.

@guyc
Copy link
Owner

guyc commented Jun 2, 2014

Sorry, haven't got to this yet, but hopefully I will soon.

sorki added a commit to sorki/py-gaugette that referenced this issue Jan 14, 2016
sorki added a commit to sorki/py-gaugette that referenced this issue Jan 14, 2016
sorki added a commit to sorki/py-gaugette that referenced this issue Jan 14, 2016
sorki added a commit to sorki/py-gaugette that referenced this issue Jan 14, 2016
@shadowfxd
Copy link

is this a dead project or does it take years to port the i2c to Raspberry Pi?

@guyc
Copy link
Owner

guyc commented Feb 9, 2017

Are those the only two options?

@shadowfxd
Copy link

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.

@plugowski
Copy link

Hi, I found your library and it will be nice to get support for I2C displays as well 👍

@kflmiami420
Copy link

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 ?

@guyc
Copy link
Owner

guyc commented Aug 21, 2019

You might try using this fork:
https://github.com/sorki/py-gaugette/tree/i2cssd

@kflmiami420
Copy link

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 ?

@kflmiami420
Copy link

kflmiami420 commented Aug 21, 2019

#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)

###################################################

#August 2019 gy-bme280 loop correct formulas
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("Raspberry Pi Zero W ")
    
  • print("Temperature: %0.1f F" % bme280.temperature2)
    
  • print("Pressure: %0.1f inHg" % inchesHg)
    
  • print("Pressure: %0.1f hPa" % bme280.pressure)
    
  • print("Humidity: %0.1f %%" % bme280.humidity)
    
  • print("Pressure: %0.1f hPa" % bme280.pressure)
    
  • print("Altitude = %0.2f meters" % bme280.altitude)
    

    time.sleep(2)

@guyc
Copy link
Owner

guyc commented Aug 22, 2019

Sorry, wish I could help, but I don't have capacity right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants