Value Display Widget giving strange results

Hello,

I have this problem in my bigger program - so I wrote a “minimal” version (see below) in order to strip out confusing details.
Value Display Widget V44 (4th Value Display Widget) is giving a “ghost result” that differs from Serial Window value and the values of other 3 similar widgets Also tried to change virtual pin to eg. V49 - same result.

I see this kind of topic is already existing but it is not marked as SOLVED.

Thank You

   #define BLYNK_PRINT Serial

    #include <ESP8266WiFi.h>
    #include <BlynkSimpleEsp8266.h>

    #include <SimpleTimer.h>
    #include <stdlib.h>

    char auth[] = "11482ce5975xxxxd64ee73fd3f7";  //Testing

    char ssid[] = "DOxxxf0574";
    char pass[] = "oaxxxeij";

    SimpleTimer timer;


    //RGBW values for each mode:
    int pinArr[4][4] = {
      {240,0,0,0},        //mode 1, RGBW ...
      {0,240,0,0},
      {0,0,240,55},  
      {0,0,0,220},       // N/A
    };

    void setup()
    {
      // Debug console
      Serial.begin(115200);

      Blynk.begin(auth, ssid, pass);


    //  Serial.println(pinArr[2][0]);
    //  Serial.println(pinArr[2][1]);
    //  Serial.println(pinArr[2][2]);

      Serial.println(pinArr[3][3]); //  showing 220 -ok
      
      Blynk.virtualWrite(V41, pinArr[3][3]); // showing 220 -ok
      Blynk.virtualWrite(V42, pinArr[3][3]); // showing 220 -ok
      Blynk.virtualWrite(V43, pinArr[3][3]); // showing 220 -ok
      Blynk.virtualWrite(V44, pinArr[3][3]); // showing 5--------------- ???? 
      
          Blynk.virtualWrite(V41, String(pinArr[3][3])); // showing 220 -ok
          Blynk.virtualWrite(V42, String(pinArr[3][3])); // showing 220 -ok
          Blynk.virtualWrite(V43, String(pinArr[3][3])); // showing 220 -ok
          Blynk.virtualWrite(V44, String(pinArr[3][3])); // showing 5------------- ???? 

      
    }

    void loop()
    {
      Blynk.run();
      timer.run();
    }

Strange. I just tested your code and it works just fine. Try to manually change V44 value to something else, like 111 to check that hardware actually writes to V44.

I tried following:

  1. Changed last item in the array from 220 to 111 - V44 shows now 2 - all othes are ok
  2. Changed the hardware to “factory fresh” (both are Wemos D1 R2) - same result
  3. Changed BlynkVirtualWrite to 111 (not array item) - same result
  4. Tried 1-3 with value 222 - V44 shows 5 - all others ok.
  5. Also tried all above with phone and tablet - same results.

Maybe you have other device or http request that overrides it?

I have another project having V44. I changed V44 to V90 in this “testing” project. I know for sure V90 is not in use anywhere else. I also tried some other Vxx alternatives - the problem remains the same. No http requests.
It is interesting the “ghost” value changes from 5 to 2 depending on the “real” value.
More suggestions please?

Not really sure what you are doing, what with sending data twice to your four vPins. overriding the 1st with the 2nd, but I just dumped your sketch into my Wemos and it looks like did whatever it was supposed to do… Here are the results…

Looks like somethings goofy on your end.

PS, probably unrelated… but you are still using SimpleTimer? BlynkTimer is now “built in”

Have you checked that your V44 display widget is connected to the correct device in the Source settings for your widget?

Pete.

Sending data twice to four pins is only for show my two different (with/without String()) testing scenes. Only one block is active when actually running sketch. No difference - problem persists.

OK, I initially ran the sketch exactly as shown above (just with my WiFi / Auth settings of course)… no problems at all after repeated tests.

I have since played around with various combinations of clearing the values before displaying the array data, changing the array data, etc. All still working perfectly. But now I have a better understanding of arrays :stuck_out_tongue: I had never really worked with them before… Quite neat and useful I see.

You must have something unique at your end that is causing your issue. Confirm latest App & library versions and possibly remove/recreate Widgets, etc.

Perhaps even make a new project with JUST those four widgets, with vPins numbered the same way, and using your example sketch above… just like I did.

Solved!
I followed instructions by @Gunner and simply recreated this “ghost” widget.

I should have done this at first place, but after a quite heavy working with Blynk widgets this kind of problem fixing had never before been necessary for me.

Thanks to everybody for nice conversation!

1 Like

Thanks for the update. Anyway, the issue is very strange. I don’t really see the way it may happen. If you see this issue again - please tell us. We will try to investigate further.