Sparkfun OLED 1.3in on Raspberry Pi, very dim

After some struggle I am able to display text with Raspberry Pi 5 and Arduino Example - SparkFun Qwiic OLED 1.3in (128 x 64 white pixels)

I used the example 02 hello world on github. However, the text is very very dim. Meanwhile if I plug in a qwiic conncetor from an Adafruit qtpy samd21 and run the Sparkfun OLED Arduino library, the text is very bright. Is this is a code problem or a power problem or something else? thanks. Both are connected to 3.3v, gnd, SCL, and SDA. Thanks

Hi @zrobot34 ,

May I ask, how did you get the Arduino example to work on Raspberry Pi 5? Did you rewrite the library to use the Raspberry Pi I2C interface instead of the Arduino version?

I can think of two possible explanations:

  • A voltage issue
  • The OLED (SSD1306) PreCharge, VCOM or Contrast settings are not correct

Please check you are using the correct Raspberry Pi pin for 3.3V.

If you have modified the library, please check you are setting:

  • Contrast (Command 0x81) - set to 0xCF
  • Pre-charge (Command 0xD9) - set to 0xF1
  • VCOMH (Command 0xDB) - set to 0x40

I hope this helps,
Paul