-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
128x128 OLED I2C using SH1107 driver #501
Comments
This is related to #418 I think support is only there in the beta release. Install via Arduino IDE (add zip lib menu). How will the 128x128 display look like with the 128x64 driver? |
Okay, I have followed your advice and downloaded U8g2 2.21.6 from your repository. I have installed the library and selected the following constructor:
Then I opened the GraphicsTest example and uploaded the code. Originally, I have tried to select the So basically, I think there needs to be a similar profile for SH1107 that would support the 128 x 128 pixel display. Can you please help me add the code needed? Please let me know and I would be glad to test your codes with my 128 x 128 OLED. Thanks! |
Strange. Which Arduino Board?
Of course. But i wanted to see to which extend the 64x128 device works. It is usually better to start with something, that works already a little bit ;-) |
I'm using NodeMCU v1.0 (Esp8266) as the board with D2 and D1 as the hardware I2C. I hope my insights help will bring us close to getting this working on the 128x128 OLED. I'm looking forward to it :D |
any datasheet for your OLED? |
I have create a new release 2.21.7 here: https://github.com/olikraus/U8g2_Arduino Can you test the FlipMode Example from the page mode examples?
Is the content still shifted? Can you sent a picture of the first flipmode picture? |
Thanks. I have downloaded 2.21.7 and uploaded the FlipMode Eample from page mode and used the constructor as you mentioned. It seems that the content is still shifted. Please see my attached photos of the first, second, third, and fourth flip mode screens. I am not sure why the display is shifted. By the way, I know you wanted the datasheet for my OLED, so I have attached it: I hope the datasheet might be insightful. |
Thanks for the controller datasheet. Yet, i was more interested in the display datasheet. It looks like that there is a 32pixel offset, which I do not really understand. My hope is, that there is some information about the 32pixel offset in the display datasheet. |
ok, let's try to fix the offset problem. Please locate file u8x8_d_sh1107.c on your disk. What will happen? Will this help?
Will this help? |
I have tried to comment out line 341 in: https://github.com/olikraus/u8g2/blob/master/csrc/u8x8_d_sh1107.c#L341 However, that did not change anything. But I followed your advice to change lines 374 and 375 in https://github.com/olikraus/u8g2/blob/master/csrc/u8x8_d_sh1107.c#L374
And then the frame aligned perfectly! Thank you very much for your help. Please see my pictures attached for reference. If there are any other tests you would like me to run, please let me know. Also, is there a way you can fix the |
Great, thanks for testing. The SW_I2C constructor should work. Can you connect your display to some other pins. Of course you need to name the pins to the constructor. |
looks good so far. I think this can be closed. Let me know of any problems. |
Hi @olikraus, I notice a slight flicker in my OLED. Also, when I try to record the OLED display with my smartphone, I see fast scrolling lines. Is there any values I can tweak to increase the refresh rate? Thanks. |
hmm, you could locate file u8g2_d_sh1107 (https://github.com/olikraus/u8g2/blob/master/csrc/u8x8_d_sh1107.c#L342) and modify the following command: |
Thank you! I tried using both U8X8_CA(0x0d5, 0x050) and U8X8_CA(0x0d5, 0x070). It seems that U8X8_CA(0x0d5, 0x050) gave a better result. Just for context, I am running this U8g2 on the ESP8266. On my OLED, for some reason I always see "vertical bars" on my image being displayed. The bars stay in the same spot, and are not flickering. Could you please tell me what can be tweaked to reduce or remove those bars? Please see my attached image to see what is seen on the display. |
Ideas:
|
Hi @dominicklee Amazing work! I've got a SH1107 compatible display but I can't make it work. |
Hi @microbirdman can you please share a picture of the schematic you've used? Also, please share a picture of your connections. I'm not sure with how you hooked it up. There are some power boost and line regulators that are required. |
@dominicklee did you improve the quality of your screen? Which (if any) of my suggestions did help? |
@olikraus I actually tried everything you suggested. To conclude, I see less lines when I increased the contrast instead of reducing. Also the more I deviate from the POR level values, either no change or the more worse it becomes. I say changed the value of Contrast Data Register from default 0x80 to 0xFF and that increased contrast and hence reduced the lines. |
ok, so you did not improve the quality at all? |
Yes. The lines were only reduced to be less visible. But the quality remains unchanged. |
hmmm. so even a ceramic cap did not improve anything? |
Hi @dominicklee , Thanks very much for your reply and sorry for the delayed answer. I didn't get the notification on my email but it's sorted now. I am following the schematic attached for the screen. I connected 3.3v to VDD and an external VPP (power supply I had at home) of 13.3v aprox. sharing same ground but it didn't work (black screen). Do you use an IC to do that voltage boost? Any suggestions? Thanks in advance. |
Could you post a simple outline / link of updated library for the 128x128 and best settings? Thanks |
Latest version is here: You can download the latest U8g2 beta release from here: https://github.com/olikraus/U8g2_Arduino/archive/master.zip
|
Hello all, I have an OLED that uses the SH1107 controller. I saw that the u8g2 library supports the SH1107 controller but it only offers a resolution of 128x64 in a couple cases. I would like to use this library for my 128x128 OLED display that uses SH1107 via the I2C pins of an ESP board. At the same time, I would like to run another I2C module such as the MPU6050 simultaneously.
If anyone could help or provide a detailed suggestion, I would appreciate it. To sum it up:
Thank you
The text was updated successfully, but these errors were encountered: