OLED SH1107 driver errors #10370
Replies: 9 comments 12 replies
-
For the way you have posted the code it is hard to tell, which line caused the error. Please use three backticks ``` to enclose code. You can as well highlight all code lines and push Ctrl-E, which will add the backticks. Nevertheless, most likely there is a communication error. What is the result of
Do the reported addresses match the I2C addresses used in your code? |
Beta Was this translation helpful? Give feedback.
-
So you could answer the questions yourself. The code sequence checks for a support width/height combination. And 128/32 is not supported by the code. |
Beta Was this translation helpful? Give feedback.
-
I get this error "OSError: [Errno 5] EIO" looking at the info on Adafruit there are 2.2K pullups on the SDA and SCL pins. There is also a note that if not stacking this on a Feather, I'm using a pico, I should also connect the reset pin, looking at the pinouts for a pico I don't see a reset pin, is there one, do I have to configure a GPIO to be a reset? |
Beta Was this translation helpful? Give feedback.
-
Same thing, same line references anyways but get this error instead "OSError: [Errno 19] ENODEV" |
Beta Was this translation helpful? Give feedback.
-
I disconnected the other 2 modules, commented out the bme instance and hard coded some values for temp, pressure and humidity, and I get the sane results as far as line references and this error "OSError: [Errno 19] ENODEV" |
Beta Was this translation helpful? Give feedback.
-
I've always had it at width=128 and height=64, although at one point I saw that the error had to do with the vertical function in the driver so I reversed it just as a shot in the dark, it didn't fix it and I didn't think it would but you have to try things, I put it back the way I originally had it. I'm wondering if it's time to go another direction, although this should work, the driver is made for the chip on this display. This was about the only driver I could find online that was compatible with a pico. We, mostly you, have spent a lot of time on it to get it to work, I don't mind continuing with what ever suggestions you have if you wish to continue. I have found another display, it's a hat made for a pico, larger screen, has 4 buttons and a RGB LED on it. I wouldn't want to use it as a hat as I loose access to the remaining GPIO pins but also found a nice breakout board that you put the pico on, the hat and you can use standard Pi hats as well. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
If I understand you right, I reversed the states on lines 30 and 32 as shown below, I've added the line numbers. Line 30 should be true as line 29 is how I have the oled configured 26 class SH1107(FrameBuffer): If this is what you meant I now get these errors Temperature: 70.27 Humidity: 90.27 Pressure: 22.34 By the way, I've reconnected the BME280 and put the i2c instance back to how I started. Just so we're both looking at the same code here's is the revised code.
Thanks |
Beta Was this translation helpful? Give feedback.
-
That's what I meant. It still puzzles me that show() succeeds as part of init_display(), but fails later on. The only thing in between is a call to power_on(), b.t.w.: Is the display sufficiently powered? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using a Pico with Thonny version 4.0.1 with Python 3.8.10. I have a BME280 sensor and a Adafruit Featherwing OLED display. Before using this display, I had another OLED that uses the ssd1306 driver and it all worked fine, was able to display the BME values.
I'm now trying to get the Adafruit display working as well, it's a bit bigger and I like that it has some buttons on it I can use, I had read that the sh1107 driver was similar and could be configured the same as the ssd1306, evidently not as it's not working for me. I don't understand what the error message is pointing out. Here's the error:
Traceback (most recent call last):
File "", line 9, in
File "/lib/sh1107.py", line 137, in init
File "/lib/sh1107.py", line 34, in init
ValueError:
Here is my code
and the sh1107 driver
Thanks for all comments and help
John
Beta Was this translation helpful? Give feedback.
All reactions