I am trying to connect to my wifi using my M5StickCPlus. I use the platformIO framework. I am getting this error : error: invalid conversion from 'const char*' to 'char*' at compilation.
Here is the code:
#include "M5StickCPlus.h"
#include <WiFi.h>
const char* WIFI_SSID = "router";
const char* WIFI_PASS = "pass";
void setup() {
M5.begin(true, true, true);
Serial.printf("Connecting to %s ", WIFI_SSID);
WiFi.begin(WIFI_SSID, WIFI_PASS);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("CONNECTED");
}
I also tried to declare the SSID and the password using #define. But, I am getting another error : addApbChangeCallback(): duplicate func=400EAB44 arg=3FFBF008 during execution.
What am I missing ?