Hey all,
I’m trying to use a menu to set sliders to specific values. I.e. you select item 1 and the sliders move to value based on your code. Here is my current code:
BLYNK_WRITE(V24) {
switch (param.asInt()) {
case 1: // Custom
Blynk.virtualWrite(V0, 65); //T1
Blynk.virtualWrite(V1, 65); //T2
Blynk.virtualWrite(V2, 65); //T3
Blynk.virtualWrite(V3, 65); //T4
Blynk.virtualWrite(V4, 0); //t1
Blynk.virtualWrite(V5, 0); //t2
Blynk.virtualWrite(V6, 0); //t3
Blynk.virtualWrite(V7, 0); //t4
Blynk.virtualWrite(V23, 0); //bt
break;
case 2: // IPA
Blynk.virtualWrite(V0, 148); //T1
Blynk.virtualWrite(V1, 172); //T2
Blynk.virtualWrite(V2, 65); //T3
Blynk.virtualWrite(V3, 65); //T4
Blynk.virtualWrite(V4, 60); //t1
Blynk.virtualWrite(V5, 10); //t2
Blynk.virtualWrite(V6, 0); //t3
Blynk.virtualWrite(V7, 0); //t4
Blynk.virtualWrite(V23, 120); //bt
break;
case 3: // Stout
Blynk.virtualWrite(V0, 130); //T1
Blynk.virtualWrite(V1, 145); //T2
Blynk.virtualWrite(V2, 65); //T3
Blynk.virtualWrite(V3, 65); //T4
Blynk.virtualWrite(V4, 30); //t1
Blynk.virtualWrite(V5, 30); //t2
Blynk.virtualWrite(V6, 0); //t3
Blynk.virtualWrite(V7, 0); //t4
Blynk.virtualWrite(V23, 60); //bt
break;
case 4: // Lager
Blynk.virtualWrite(V0, 130); //T1
Blynk.virtualWrite(V1, 148); //T2
Blynk.virtualWrite(V2, 172); //T3
Blynk.virtualWrite(V3, 65); //T4
Blynk.virtualWrite(V4, 40); //t1
Blynk.virtualWrite(V5, 20); //t2
Blynk.virtualWrite(V6, 10); //t3
Blynk.virtualWrite(V7, 0); //t4
Blynk.virtualWrite(V23, 60); //bt
case 5: // Saison
Blynk.virtualWrite(V0, 128); //T1
Blynk.virtualWrite(V1, 65); //T2
Blynk.virtualWrite(V2, 65); //T3
Blynk.virtualWrite(V3, 65); //T4
Blynk.virtualWrite(V4, 60); //t1
Blynk.virtualWrite(V5, 0); //t2
Blynk.virtualWrite(V6, 0); //t3
Blynk.virtualWrite(V7, 0); //t4
Blynk.virtualWrite(V23, 60); //bt
}
}
The first three menu items work fine. But when I get to the 4th one, the sliders move and then reset back to 65 and 0 (65 is at the bottom of the range for those sliders). Anybody have an idea as to why this is happening?