Page 1 of 1
OLED SH1106_SPI Contrast
Posted: Sat Jun 14, 2025 4:19 pm
by Abhijit
Hello!
I am trying to control the brightness/contrast of the SH1106_SPI OLED display, after searching the internet found out it is possible by using below commands, can someone suggest how to implement the same in chart if it is possible.
display.SH1106_command(0x81);
display.SH1106_data(50);
Thank you.
Abhi
Re: OLED SH1106_SPI Contrast
Posted: Sat Jun 14, 2025 5:01 pm
by chipfryer27
Hi Abhi
I could be totally wrong here but it looks like you just need to send an SPI command to write to location 0x81 a value of 50.
However if you are using a FC component it might be trickier, but you could perhaps download the source code from the WiKi.
Maybe make a feature request as it seems a handy thing to be able to do?
Regards
Re: OLED SH1106_SPI Contrast
Posted: Sun Jun 15, 2025 10:08 am
by Abhijit
Hi! Chipfryer
Thank you for your inputs, as said I tried to explore the source code file from WiKi, unfortunately, nothing I understood, probably not my cup of tea.
By the way there is one macro available in the component macro list "Write Command" but again clueless about how to write. I tried to write the same macro 2 times, one with 0x81 and following 50 (I tried several numbers from 1 to 250) but did not notice anything happening, or may be I am not writing it in the correct way.
I hope matrix team may point out some suggestion or correct way to control the brightness/contras.
I am using below OLED for my project.
https://www.waveshare.com/wiki/1.3inch_OLED_(B)
Thank you.
Abhi
Re: OLED SH1106_SPI Contrast
Posted: Sun Jun 15, 2025 3:13 pm
by medelec35
hello.
When I'm back at work tomorrow, I will see what I can sort out for you.
Re: OLED SH1106_SPI Contrast
Posted: Mon Jun 16, 2025 2:47 am
by Abhijit
Hi! Martin
Good morning
Okay, I shall wait for your feedback.
Thank you.
Abhi