Serial comunication with NodeMCU, arduino and blynk

Hello, I’m coming to this site to ask for help with my problem that i’m struggeling for hours. I would like to:

  1. Change the value of V5 pin by button in Blynk app
  2. Check if value equales 1
  3. If yes, run serial comunication with arduino (and rest will be done on arduiono)

And here comes my problem: if i break code on parts: Blynk to node, node to arduino, it works, but when i put it togheter it can’t work. I would really appreciate if someone could help me.

  1. Notes:
    *NodeMCU comunicates with arduino using function used in this code
  • Blynk app can change the value of V5, i have checked it by println(pinValue); and serial monitor
  • When that code is uploaded it seems that Blynk app loose conettion after a while
  1. Hardware:
  • Arduino Uno
  • NodeMCU v3, ESP12-E
  1. Code:

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

    SoftwareSerial s(3,1);

    char auth = “kkk”;
    char ssid = “xxx”;
    char pass = “yyy”;

    void setup()
    {
    // s.begin(9600);
    Serial.begin(9600);
    Blynk.begin(auth, ssid, pass);
    }
    BLYNK_WRITE(V5)
    {
    int pinValue = param.asInt();
    if (pinValue == 1)
    {
    transmit();
    }
    }
    void loop() {
    Blynk.run();
    }

    void transmit()
    {
    s.write(123);
    delay(1000);
    }

Don’t do this!!!

Pete.

I have deleted it, but it seems that it’s still not working

“Not working” covers a multitude of scenarios.

Pete.