Display used: 0.91 Inch 128x32 IIC I2C Blue, OLED LCD Display DIY Oled Module, SSD1306 Driver IC
I use the call to: drawStr
C++/Arduino Prototype: u8g2_uint_t U8g2::drawStr(u8g2_uint_t x, u8g2_uint_t y, const char *s)
Example that works:
u8g2.setFont(u8g2_font_logisoso20_tr); u8g2.drawStr(0, 29, "Monday");
Example that doesn't work:
String DOW_Str; // (actually received as string from a functon call, from another library) DOW_Str = "Monday"; u8g2.drawStr(0, 29, DOW_Str); // obviously wrong, see the function prototype above and the error message below
Error message: no matching function for call to 'U8G2_SSD1306_128X32_UNIVISION_F_HW_I2C::drawStr(int, int, String&)'
Unfortunately, all my attempts to pass to draw.Str a variable derived from DOW_str (for example by using toCharArray or string.c_str() ) failed.
How should it be properly done? An example with eventually a variable declaration, its initialization and the call to drawStr would be very appreciated.