OLED SH1106_SPI Contrast

For general Flowcode discussion that does not belong in the other sections.
Post Reply
Abhijit
Posts: 16
http://meble-kuchenne.info.pl
Joined: Thu Dec 03, 2020 6:26 am
Has thanked: 3 times

OLED SH1106_SPI Contrast

Post 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

chipfryer27
Valued Contributor
Posts: 1575
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 357 times
Been thanked: 560 times

Re: OLED SH1106_SPI Contrast

Post 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

Abhijit
Posts: 16
Joined: Thu Dec 03, 2020 6:26 am
Has thanked: 3 times

Re: OLED SH1106_SPI Contrast

Post 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

medelec35
Matrix Staff
Posts: 1956
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 626 times
Been thanked: 656 times

Re: OLED SH1106_SPI Contrast

Post by medelec35 »

hello.
When I'm back at work tomorrow, I will see what I can sort out for you.
Martin

Abhijit
Posts: 16
Joined: Thu Dec 03, 2020 6:26 am
Has thanked: 3 times

Re: OLED SH1106_SPI Contrast

Post by Abhijit »

Hi! Martin
Good morning

Okay, I shall wait for your feedback.

Thank you.

Abhi

Post Reply