Device online but not functioning

Hi there, ive recently build a wifi controlled rc car using the esp8266 (esp-12f) by following a tutorial on youtube, ive done and followed every step correctly but when i turn the device on it says online in the blynk web but when i try to function, it doesnt work, i can only hear some sounds…maybe from the node board when i press the buttons…but the motors doesnt work…i feel like theres a problem with the code itself…if you can please help me out…thanks

sorry here are the info

  1. im using an android (android 14)
  2. Blynk region - India
  3. Hardware - ESP8266
    4)Software for uploading - Arduino IDE 2.3.2
#define BLYNK_TEMPLATE_NAME "wifi car keren"
#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
 
//Motor PINs
#define ENA D0
#define IN1 D1
#define IN2 D2
#define IN3 D3
#define IN4 D4
#define ENB D5
 
bool forward = 0;
bool backward = 0;
bool left = 0;
bool right = 0;
int Speed;
char auth[] = "wcf145702N3Kv9nqGEzGdw54dCf33fHA"; //Enter your Blynk application auth token
char ssid[] = "OHCL 7775"; //Enter your WIFI name
char pass[] = "33f00P1@"; //Enter your WIFI passowrd
 
 
void setup() {
  Serial.begin(9600);
  pinMode(ENA, OUTPUT);
  pinMode(IN1, OUTPUT);
  pinMode(IN2, OUTPUT);
  pinMode(IN3, OUTPUT);
  pinMode(IN4, OUTPUT);
  pinMode(ENB, OUTPUT);
 
  Blynk.begin(auth, ssid, pass);
}
 
BLYNK_WRITE(V0) {
  forward = param.asInt();
}
 
BLYNK_WRITE(V1) {
  backward = param.asInt();
}
 
BLYNK_WRITE(V2) {
  left = param.asInt();
}
 
BLYNK_WRITE(V3) {
  right = param.asInt();
}
 
BLYNK_WRITE(V4) {
  Speed = param.asInt();
}
 
void smartcar() {
  if (forward == 1) {
    carforward();
    Serial.println("carforward");
  } else if (backward == 1) {
    carbackward();
    Serial.println("carbackward");
  } else if (left == 1) {
    carturnleft();
    Serial.println("carfleft");
  } else if (right == 1) {
    carturnright();
    Serial.println("carright");
  } else if (forward == 0 && backward == 0 && left == 0 && right == 0) {
    carStop();
    Serial.println("carstop");
  }
}
void loop() {
  Blynk.run();
  smartcar();
}
 
void carforward() {
  analogWrite(ENA, Speed);
  analogWrite(ENB, Speed);
  digitalWrite(IN1, LOW);
  digitalWrite(IN2, HIGH);
  digitalWrite(IN3, HIGH);
  digitalWrite(IN4, LOW);
}
void carbackward() {
  analogWrite(ENA, Speed);
  analogWrite(ENB, Speed);
  digitalWrite(IN1, HIGH);
  digitalWrite(IN2, LOW);
  digitalWrite(IN3, LOW);
  digitalWrite(IN4, HIGH);
}
void carturnleft() {
  analogWrite(ENA, Speed);
  analogWrite(ENB, Speed);
  digitalWrite(IN1, HIGH);
  digitalWrite(IN2, LOW);
  digitalWrite(IN3, HIGH);
  digitalWrite(IN4, LOW);
}
void carturnright() {
  analogWrite(ENA, Speed);
  analogWrite(ENB, Speed);
  digitalWrite(IN1, LOW);
  digitalWrite(IN2, HIGH);
  digitalWrite(IN3, LOW);
  digitalWrite(IN4, HIGH);
}
void carStop() {
  digitalWrite(IN1, LOW);
  digitalWrite(IN2, LOW);
  digitalWrite(IN3, LOW);
  digitalWrite(IN4, LOW);
}```

heres the code, i dont know if its in the right format…i didnt know how to change the format

@lunemoh Please edit your post, using the pencil icon at the bottom, and add triple backticks at the beginning and end of your code so that it displays correctly.
Triple backticks look like this:
```

Copy and paste these if you can’t find the correct symbol on your keyboard.

Pete.

done sir

You’re trying to do an analog write to GPIO16 (D0) but GPIO16 doesn’t support PWM output, which is required to provide an analog output.

Also, the code you’re using is very badly written, because it calls the smartcar() function from the void loop, which won’t work well with Blynk.

In reality, the smartcar() function isn’t need3d at all if the code was written in a better way.

Pete.

thanks for the reply sir, but im kinda new to this stuffs and still catching up to some basics, so sir what should i do now to make it work?..will changing the code be enough…or do i have to perform some hardware changes as well.

You can’t have the ENA pin of your motor controller attached to D0, so you need to change the hardware setup, and then alter the software to correspond to the pin you are now using.

Pete.

sorry for asking every detail, so where should i connect my ena to?

I’d suggest you post a comment on the YouTube video that you’ve been following and explain your issue.
I’m not prepared to get in to trying to fix someone else’s badly written code with you, when your knowledge of microcontrollers and C++ is extremely limited.

Pete.