Chat here is you are connecting ESP-xx type modules to existing AVR based Arduino

Moderator: igrr

User avatar
By Wala
#89037 Hello
I am a beginner in the Arduino world, and I faced problem. I tried in many ways but to no avail !! I need a solution because it is for my graduate project

I have WiFi Module (esp8266-esp 01) I tried to connect it with Arduino Uno and I faced this error

Image

I tried also to downgrade the version of the board but doesn't work.
about the last error, I have checked the ports and try other cables but the same problem..

this is my code to test the connection

Code: Select all#include <SPI.h>
#include <WiFi.h>

char ssid[] = "——";                     // your network SSID (name)
char key[] = "— —";       // your network key
int keyIndex = 0;                                // your network key Index number
int status = WL_IDLE_STATUS;                     // the Wifi radio's status

void setup() {
  //Initialize serial and wait for port to open:
  Serial.begin(9600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only
  }

  // check for the presence of the shield:
  if (WiFi.status() == WL_NO_SHIELD) {
    Serial.println("WiFi shield not present");
    // don't continue:
    while (true);
  }

  // attempt to connect to Wifi network:
  while ( status != WL_CONNECTED) {
    Serial.print("Attempting to connect to WEP network, SSID: ");
    Serial.println(ssid);
    status = WiFi.begin(ssid, keyIndex, key);

    // wait 10 seconds for connection:
    delay(10000);
  }

  // once you are connected :
  Serial.print("You're connected to the network");
}

void loop() {
  // check the network status connection once every 10 seconds:
  delay(10000);
 Serial.println(WiFi.status());
}

 


I connected it like this:

Image

Arduino Uno:
3.3V > Breadboard
Gnd > Gnd (esp)
Rx > Tx (esp)

Esp:
3V3 > Breadboard
EN > Breadboard
Gnd > Gnd (Arduino)
Tx > RX (Arduino)
Last edited by Wala on Wed Oct 07, 2020 8:11 am, edited 1 time in total.
User avatar
By schufti
#89041 1st: don't use an arduino for flashing an esp
2nd: don't use an arduino for flashing an esp
....
buy an cheap usb-serial converter and stay mentally healthy

if you cant resist:
a) remove the µC from the uno or keep it in reset state
b) connect Rx-Rx, Tx-Tx
c) place an 470µ/6V between 3V3 and gnd
d) wire EN to 3V3
e) pull gpio0 to gnd, gpio2 and rst to 3V3 via 10k resistors