Hi,
I’m trying to migrate my legacy blynk projects to the new Blynk 2.0
I have a pro account.
If the value of the menu widget is 0, the max property of the slide widget will hav to be 1023, and if the value of the menu widget is different to 0, the max property of the slide widget have to be 100.
This is the piece where I use Blynk.setproperty, and it didn’t work with the new Blynk 2.0. (It worked fine with the legacy blynk).
Note: int Modo is declared on the main sketch
BLYNK_WRITE(V26) //Menu Modo. Esta función es llamada cada vez que se cambia el menu de Modo
{
int pinData = param.asInt();
Modo = pinData;
Serial.print("Modo: ");
Serial.println(Modo);
switch (Modo) {
case 0:
{
Blynk.setProperty(V0, "max", 1023);
Blynk.setProperty(V1, "max", 1023);
Blynk.setProperty(V2, "max", 1023);
Blynk.setProperty(V3, "max", 1023);
Serial.println(1023);
break;
}
default:
{
Blynk.setProperty(V0, "max", 100);
Blynk.setProperty(V1, "max", 100);
Blynk.setProperty(V2, "max", 100);
Blynk.setProperty(V3, "max", 100);
Serial.println(100);
break;
}
}
}
I can see the nunber 100 or 1023 printed on the serial console. But the max value didn’t change.
I suspect it´s something related in how I configured the datastream used by the slide widget. This is one example of how is configured the datastream:
Any suggestion?