Here is my code:
saving data:
Blynk.virtualWriteBinary(V0,valves,sizeof(valves));
Restoring this data:
// restore data at connect
BLYNK_WRITE(V0)
{
memcpy(valves,param.getBuffer(),param.getLength());
}
BLYNK_CONNECTED()
{
Blynk.syncAll();
}
But it looks like the data is corrupted.
What am I doing wrong?
Thanks.