Unable to use U8G2 for ssd1306 display

Discussion about Z-Uno product. Visit http://z-uno.z-wave.me for more details.
Post Reply
niom
Posts: 7
Joined: 24 May 2023 10:37

Unable to use U8G2 for ssd1306 display

Post by niom »

Hi guys,

Have been trying to use ZUNO_U8G2 library.
Except I can't use classes defined there becuase they are guarded by the "U8X8_USE_PINS" guards. Is it done on pupose and am I missing something.
The sketch is pretty simple

Code: Select all

 U8G2_SSD1306_128X64_NONAME_F_HW_I2C u8g2 (U8G2_R0, 255,10, 9);

void setup() {

  u8g2.begin();
  u8g2.setPowerSave(0);
  //modele d'écriture
  u8g2.setFont(u8g2_font_ncenB14_tr);
}

void loop() {

  u8g2.clearBuffer();
  u8g2.setFont(u8g2_font_ncenB14_tr);
  u8g2.drawStr(0, 20, "Hello World!");

  u8g2.sendBuffer();
}

Would you mind telling me what am I doing wrong?
niom
Posts: 7
Joined: 24 May 2023 10:37

Re: Unable to use U8G2 for ssd1306 display

Post by niom »

Switched to Arduino IDE and everything compiled fine. I guess it's my VS Code environment that messes something up.
My bad.
Post Reply