hostmit
November 16, 2018, 2:59pm
1
Hello! I running my server and have following in my loop
Blynk.syncVirtual(110);
and following function to catch writes from “value widget”
BLYNK_WRITE(110) {
Serial.Println(“here”);
}
That code works perfect on one ESP32 and doesnt trigger BLYNK_WRITE(110) on another ESP32, same server. How do I debug? Sketches are identical, auth tokens different.
Blynk Server 0.39.12 successfully started.
two separate projects, two devices devices
Widget value display.
post the sketch here (properly formatted that is).
Also if it really is
hostmit:
in my loop
then that may be the issue.
1 Like
Also the value widget (labeled or display) doesn’t write, it is for displaying. So it wouldnt have a BLYNK_WRITE
associated with it.
1 Like
hostmit
November 17, 2018, 9:55am
4
Solved by initializing value first. Unless server got anything set it wont do “write” procedure. I expected to “write"s with null” params but no.
So you have to init VPIN value, for instance execute once Blynk.virtualWrite(110,""). Now you’ll get syncVirtual to proc BLYNK_WRITE.
Same issue has been discussed @ github. Developer said it’s by design. Well, should have stated in manual
Gunner
November 17, 2018, 10:40am
5
Is a value a value before you assign it a value
Then we would have pages and pages of what is NOT going to happen when nothing is intended to happen
NOTE: vehicle gauges will not show any levels when vehicle is off
NOTE: Caller ID will not show caller when no one calls you
NOTE: Coffee machine will not contain coffee until you add water… and coffee… and turn it on…
But seriously… I actually ran into something similar when dealing with API issues… I blamed it all on lack of documentation as well
Marking this topic solved
hostmit
November 17, 2018, 11:00am
7
foo(int x) {}
int a;
foo(a);
wont break most of languages if any. c++ will assume a = 0 on most compilers, js will consider a = undefined, etc.
However, thanks Dmitriy for quick response and help.