[SOLVED] Cannot get virtual pins to read

Hi,
I have my ESP8266 (Huzzah) connected, and can control the GPIO directly.
However, I cannot get the code to read a virtual pin change from the app.
See the program below, the LED does not change, and there is no serial output:

void setup()
{
  Serial.begin(115200);
  Blynk.begin(auth, ssid, password);
  pinMode(LED_BUILTIN, OUTPUT);
  digitalWrite(LED_BUILTIN,HIGH);
}

BLYNK_WRITE(V0)
{
    if (param.asInt()){       
        digitalWrite(LED_BUILTIN, HIGH);
    } 
    else {
        digitalWrite(LED_BUILTIN, LOW);
    }
  
  Serial.print("LED 1 Written");
  Serial.println(param.asInt());
}

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

Thanks in advance,
Tom

Have you got any blynk examples to work? Do you see anything if you enable blynk debug? Try putting these at the top of your script:

#define BLYNK_DEBUG
#define BLYNK_PRINT Serial

Open the serial monitor, do you see anything?

1 Like

Not sure what I did wrong here, project is working fine now.
Regards,
Tom