I tried to port the I2C OLED code from STM32duino (which is working) to GD32 but failed, the HW I2C I'm using now with GD32 is SCL(PB8) and SDA(PB9), below is the STM32duino codes associated with OLED:
#include <U8x8lib.h>
U8X8_SSD1306_128X64_NONAME_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE);
void setup() {
...
u8x8.begin();
u8x8.setPowerSave(0);
u8x8.setFont(u8x8_font_chroma48medium8_r);
}
void loop() {
...
u8x8.drawString(0,3,"ChipTmp = ");
u8x8.setCursor(10,3);
u8x8.print(In_Temp);
delay(1);
}
the screen is just totally black
I tried to port the I2C OLED code from STM32duino (which is working) to GD32 but failed, the HW I2C I'm using now with GD32 is SCL(PB8) and SDA(PB9), below is the STM32duino codes associated with OLED:
#include <U8x8lib.h>
U8X8_SSD1306_128X64_NONAME_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE);
void setup() {
...
u8x8.begin();
u8x8.setPowerSave(0);
u8x8.setFont(u8x8_font_chroma48medium8_r);
}
void loop() {
...
u8x8.drawString(0,3,"ChipTmp = ");
u8x8.setCursor(10,3);
u8x8.print(In_Temp);
delay(1);
}
the screen is just totally black