I have a Wemos D1 board with a OLED display using the u8g2 library.
I am printing my MAC-adress on the serial port & would like to print the same information on the OLED:
#include <ESP8266WiFi.h>
#include <U8g2lib.h>
byte mac[6];
setup(){
Serial.println(WiFi.macAddress());
WiFi.macAddress(mac);
u8g2.drawStr(1,10,WiFi.macAddress());
u8g2.sendBuffer();
}
This does not work. It prints the MAC-address on the serial port but not on the OLED.
I get: no known conversion for argument 3 from 'String' to 'const char*
How can I print the MAC-information on my oled using the u8g2-library?
WiFi.macAddress().c_str()
arduino.cc/reference/en/language/variables/data-types/string/…