BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

BlYNK_WRITE not working or am I dumb?

Hello, I am using an esp8266 and want to make a sort of water temperature controller but I can’t get the BLYNK_WRITE function to work and recieve the values. I am using the numeric input on the app to send the numbers

#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
char auth[] = "AUTH CODE";
char ssid[] = "SSID";
char pass[] = "PASSWORD";
int t;
void setup() {

    Serial.begin(115200);
    Blynk.begin(auth, ssid, pass);
}

void loop() {

Blynk.run();

}

BLYNK_WRITE(V2){
  t = param.asInt();
  // Serial.begin(115200);
  Serial.println(t);
}

I fixed your formatting. Backticks, not commas or apostrophes.

Blynk%20-%20FTFC

Your code looks OK at a glance… are you sure the device is going on line? What does the Serial monitor show?

Have you tried any other widget? Even a simple button should alternate between 0 & 1 as your press it.

Also what does your serial monitor actually show?

Thanks for the help and heads Up, My serial monitor shows nothing, when I change the numeric input on the app. It just does the typical Blynk serial debug and thats it. I am using the 0.5.4 Blynk library, is it because numeric input was not yet implemented in that version?

Never mind, I just updated the library and it did absolutely nothing

And that looks like???

Have you setup the Debug yet? And what does it look like?

Tried any other Serial Print commands, like in setup to show the progress of commands?

Is the App it indicating connection to the device?

Good, you shouldn’t even be trying old libraries as there have been too many changes.

Did you even try any other basic widgets as suggested?

We can do very little with this… Let’s not be the blind leading the dumb :stuck_out_tongue_winking_eye: … details please :slight_smile:

I have now updated the library, I have tried with a simple button on VP 2, and the Serial debug says it is connected, it pings and everything, but never prints the value of the widget. I really dont know what to do, I can send you a screen capture if you want. I have also tried my version of debug, and also did nothing

ok, I know seem to know the fix for the problem, and have a guess for the cause. I made a new project and all worked fine. It might be because I had 3 devices on the other project, although that shouldn’t be an issue, also I had the correct device selected. I think the problem is the bugged project, because months ago I tried experimenting with BLE and had a huge bug where out of nowhere it changed the virtual pins in my project and the devices had mixed their virtual pins mixed up. I tried using BLE and sending data from hardware to hardware and got a nasty bug for it. Thanks for the help anyways.