I was trying to send a string via variable senderAddr in M2_LABEL(alert_sender_name, "f0", senderAddr);. But when I try to compile the code it gives me the following error.
Arduino/libraries/M2tklib/utility/m2.h:641:101: error: cannot convert 'String' to 'const char*' in initialization
#define M2_LABEL(el,fmt,str) m2_el_str_t el M2_SECTION_PROGMEM = { { m2_el_label_fn, (fmt) }, (str) }
^
sketch/menu.h:182:1: note: in expansion of macro 'M2_LABEL'
M2_LABEL(alert_sender_name, "f0", senderAddr);
^
I was trying to send a string via variable
senderAddr
inM2_LABEL(alert_sender_name, "f0", senderAddr);
. But when I try to compile the code it gives me the following error.How can I fix it? Please help!