How to flashing 2 physical LED of mobile Robot

Hi guys,
Im building a mobile control car using wifi and arduino. The problem is to make the physical LEDs (signal indicator) flashing when the virtual button is pressed.

The mobile robot consists of:-
Arduino Nano
ESP-01 ESP8266
Logic Converter
L298N motor Driver
LEDs (Headlight, Taillight, Signal)

Android 8.1

The headlight and the taillight working well through directly assigned pin on the app. Only the signal indicator is not flashing.

#define BLYNK_PRINT Serial


char auth[] = "XXXX"; 

char ssid[] = "XXXX";
char pass[] = "XXXX";

SoftwareSerial EspSerial (2, 3); // here RX, TX

#define ESP8266_BAUD 9600

ESP8266 wifi(&EspSerial);

#define led1 A0 //
#define led2 A1 //
int ledState = LOW; //
const long interval = 400; //
unsigned long previousMillis = 0; //

void setup() 
  pinMode(led1, OUTPUT); //
  pinMode(led2, OUTPUT); //


   Blynk.begin(auth, wifi, ssid, pass);

void loop() 

    if (param.asInt() == 1)
      unsigned long currentMillis = millis();
      if (currentMillis - previousMillis >= interval)
        previousMillis = currentMillis;

        if (ledState == LOW)
          ledState = HIGH;
          ledState = LOW;

        digitalWrite(led1, ledState);
        digitalWrite(led2, !ledState);
      digitalWrite(led1, LOW);
      digitalWrite(led2, LOW);

You might want to look at using Virtual pins…

Look at how this is done and change for Physical LEDs if you need.

The Signal LED is connected to the analog pin and it is set to blinking when the virtual pin (V0) is pressed. But code for the blinking have the problem.

I will try to change it to physical led

I ment use virtual pins for everything on the App, not a mixture of direct pin control and virtual pin control.

Will try to change all the pin to virtual and update it :grinning: