In wifi controlled robot to where the code is programmed? esp or to arduino uno

in my project wi-fi controlled robot using esp8266 I failed to program to it
in serial monitor show disable to echo
i programmed to the board arduino
circuitdigest.com/microcontroller-projects/arduino-wifi-controlled-robot

The ESP should be running the AT firmware. You can check this by hooking it up to a serial-to-USB device or use your arduino as one by removing the chip (not recommended).

Did you hook up the Tx/Rx wires correct with a resistor as not too overload the Rx on the ESP? And in the good order? Tx to Rx and Rx to Tx. Because the Arduino sends 5v to there and the ESP can’t handle that.

1 Like
#define BLYNK_PRINT Serial    // Comment this out to disable prints and save space
#include <ESP8266_SoftSer.h>
#include <BlynkSimpleShieldEsp8266_SoftSer.h>
// Set ESP8266 Serial object
#include <SoftwareSerial.h>
SoftwareSerial EspSerial(2, 3); // RX, TX
ESP8266 wifi(EspSerial);
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "caa17a11c0124d4083d0eaa995f45917";
#define m11 8
#define m12 9
#define m21 10
#define m22 11
void forward()
{
  digitalWrite(m11, HIGH);
  digitalWrite(m12,LOW);
  digitalWrite(m21,HIGH);
  digitalWrite(m22,LOW);
}
void backward()
{
  digitalWrite(m11, LOW);
  digitalWrite(m12,HIGH);
  digitalWrite(m21,LOW);
  digitalWrite(m22,HIGH);
}
void right()
{
  digitalWrite(m11, HIGH);
  digitalWrite(m12,LOW);
  digitalWrite(m21,LOW);
  digitalWrite(m22,LOW);
}
void left()
{
  digitalWrite(m11, LOW);
  digitalWrite(m12,LOW);
  digitalWrite(m21,HIGH);
  digitalWrite(m22,LOW);
}
void Stop()
{
  digitalWrite(m11, LOW);
  digitalWrite(m12,LOW);
  digitalWrite(m21,LOW);
  digitalWrite(m22,LOW);
}
void setup()
{
  // Set console baud rate
  Serial.begin(9600);
  delay(10);
  // Set ESP8266 baud rate
  // 9600 is recommended for Software Serial
  EspSerial.begin(9600);
  delay(10);
  Blynk.begin(auth, wifi, "username", "password");  // wifi username and password
  pinMode(m11, OUTPUT);
  pinMode(m12, OUTPUT);
  pinMode(m21, OUTPUT);
  pinMode(m22, OUTPUT);
}
BLYNK_WRITE(V1) 
{
  int x = param[0].asInt();
  int y = param[1].asInt();
  // Do something with x and y
/*  Serial.print("X = ");
  Serial.print(x);
  Serial.print("; Y = ");
  Serial.println(y);*/
  if(y>220)
  forward();
  else if(y<35)
  backward();
  else if(x>220)
  right();
  else if(x<35)
  left();
  else
  Stop();
}
void loop()
{
  Blynk.run();
}

in to which board this program upload

That should be in the Arduino board

1 Like

If any code upload in esp8266

No, from the factory they get delivered with the AT firmware, however, mind you, if you use software serial you probably have to set the Baudrate on the ESP to a lower speed!

1 Like

Code snippets should be formatted. Please edit your initial post:

How to do that:


 ``` cpp <--put 3 backticks BEFORE your code starts  ("cpp" means C++ language) 

   //Put your code here
   //..................
   //..................

 ``` <--insert 3 backticks AFTER your code

**This makes your code readable and with highlighted syntax, like this

↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓

//comment goes here 
void helloWorld() { 
   String message =  "hello" + "world"; 
}

in this esp8266 works as a hotspot??
or wifi??

WiFi not hotspot.

1 Like

Then how I give username and password in the code

By modifying the code? It clearly states where you have to enter that information.

But my esp8266 have no password
How i give it
It have only username
What i do

in this line that you have in your sketch:

Blynk.begin(auth, wifi, "username", "password");  // wifi username and password

But this is not get to esp8266

In serial monitor shows
Blynk
Connecting username
Disable to echo
What to do

The Uno passes it to the ESP.

1 Like

Search this site for β€œecho” and good luck.

1 Like