OLED in QMK

Hello, I’m noob in kb development and i try to figure out what’s going wrong with my board (QMK firmware). I have design with cheap rpi pico clone, and i struggling with 128x64 oled (ssd1306 via i2c) my SDA and SCL pins are gp12 and gp13. This is not default pins for i2c and i need redefine this in configs.
Maybe someone know some sucsessfull examples of keyboards like my where i can compare defines, or maybe someone just know what i forgot to do to make this working… I’m about to give up and appreciate any help.

2 Likes

halconf.h and mcuconf.h are good.

Create a config.h file if not there already (besides halconf.h and mcuconf.h) and add:

#define I2C_DRIVER I2CD0
#define I2C1_SDA_PIN GP12
#define I2C1_SCL_PIN GP13
#define I2C1_CLOCK_SPEED 400000

This should correctly configure the I2C device :wink:

3 Likes

#define OLED_IC OLED_IC_SSD1306
#define I2C_DRIVER I2CD0
#define OLED_DISPLAY_128X64
#define OLED_BRIGHTNESS 255
#define I2C1_SDA_PIN GP12
#define I2C1_SCL_PIN GP13
#define I2C1_CLOCK_SPEED 400000

this config works well in my case. THANK YOU A LOT!! I already struggling with this configs two weeks…

But i don’t understand WHYYYY when we define D0 driver we define SDA,SCL,CLOCK SPEED with I2C1? i thought it must be I2C0 there…
Enyway my display works and now i’m able to experiment more hehe
Thanks Rico!

2 Likes

I don’t know either :smiley:

1 Like