olikraus / u8g2

U8glib library for monochrome displays, version 2
Other
4.91k stars 1.02k forks source link

ST5767_LW12832* Compile error #2463

Open kittenarmy opened 1 week ago

kittenarmy commented 1 week ago

As I was working through list of constructors for https://github.com/olikraus/u8g2/issues/2462 I get this error compiling for GraphicsTest.ino:

U8G2_ST7567_LW12832_1_SW_I2C' does not name a type; did you mean 'U8G2_ST7567_122X32_1_SW_I2C'?

Also with (I didn't test the others):

// U8G2_ST7567_LW12832_1_SW_I2C u8g2(U8G2_R0, A5, A4, 19); 
// U8G2_ST7567_LW12832_2_SW_I2C u8g2(U8G2_R0, A5, A4, 19); 
// U8G2_ST7567_LW12832_1_HW_I2C u8g2(U8G2_R0, A5, A4, 19); 
olikraus commented 1 week ago

For me the following constructor works without problems:

U8G2_ST7567_LW12832_1_SW_I2C u8g2(U8G2_R0, /* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ 5);

At least with the latest beta...

You can download the latest U8g2 beta release from here: https://github.com/olikraus/U8g2_Arduino/archive/master.zip Arduino IDE:

  1. Remove the existing U8g2_Arduino library (https://stackoverflow.com/questions/16752806/how-do-i-remove-a-library-from-the-arduino-environment)
  2. Install the U8g2_Arduino Zip file via Arduino IDE, add zip library menu (https://www.arduino.cc/en/Guide/Libraries).

PlatformIO: platformio.ini (https://docs.platformio.org/en/latest/projectconf/section_env_library.html#lib-deps) should include

lib_deps =
  u8g2=https://github.com/olikraus/U8g2_Arduino/archive/master.zip