Hi my name is Riccardo
For one of my projects, I tried to save the data on flash memory and when the device restarts it takes the connection parameters from memory and next it creates the pointer.
Now it works great but when I try to send data using the >> operator the Compiler gives me this error:
no match for 'operator>>' (operand types are 'ThingerESP8266' and 'thingerInit()::__lambda0')
and this is a part of the code:
FIRST PART
ThingerESP8266* thing;
void setup() {
Serial.begin(9600);
EEPROM.begin(512);
Wire.begin(sda, scl);
MPU6050_Init();
getFromEEPROM();
delay(500);
if (1) {
acceso_millis = 0;
vibrazioni_millis = 0;
giorni = 0;
ore = 0;
minuti = 0;
secondi = 0;
giorni_v = 0;
ore_v = 0;
minuti_v = 0;
secondi_v = 0;
Serial_com();
saveOnEEPROM();
delay(100);
Serial.println("Saved :)");
}
thing = new ThingerESP8266(user, device_Id, device_credentials);
delay(100);
thingerInit();
SPI.begin();
}
SECOND PART
void thingerInit() {
Serial.println(user);
Serial.println(device_Id);
Serial.println(device_credentials);
Serial.println(WiFi_ssid);
Serial.println(WiFi_password);
thing->add_wifi(WiFi_ssid, WiFi_password);
thing["millis"] >> outputValue(ore);
thing["Ciao"] >> [](pson & out) {
out["Ore"] = ore;
out["Minuti"] = minuti;
out["Secondi"] = secondi;
};
}
Can anyone help me?