How to solve issue with esp8266 connected to arduino uno?

I am using this schematic with the esp8266 on Arduino Uno:

I am testing for the wifi networks available as I saw an example in a tutorial. However, by uploading the code to the Arduino I get this error:

In the boards manager section, I downloaded esp8266 by ESP8266 Community, version 2.5.1.
The code used can be seen below:

/*
 *  This sketch demonstrates how to scan WiFi networks. 
 */
#include "ESP8266WiFi.h"
 
void setup() {
  Serial.begin(115200);
 
  WiFi.mode(WIFI_STA);
  WiFi.disconnect();
  delay(100);
 
  Serial.println("Setup done");
}
 
void loop() {
  Serial.println("scan start");
 
  // WiFi.scanNetworks will return the number of networks found
  int n = WiFi.scanNetworks();
  Serial.println("scan done");
  if (n == 0)
    Serial.println("no networks found");
  else
  {
    Serial.print(n);
    Serial.println(" networks found");
    for (int i = 0; i < n; ++i)
    {
      // Print SSID and RSSI for each network found
      Serial.print(i + 1);
      Serial.print(": ");
      Serial.print(WiFi.SSID(i));
      Serial.print(" (");
      Serial.print(WiFi.RSSI(i));
      Serial.print(")");
      Serial.println((WiFi.encryptionType(i) == ENC_TYPE_NONE)?" ":"*");
      delay(10);
    }
  }
  Serial.println("");
 
  // Wait a bit before scanning again
  delay(5000);
}

From your pictures I see two problems, first you have no power connected. Second I cannot read your errors, you need to capture them and past into the forum. Left click on the right side just above the errors the button that says "Copy error messages" That will put it in your clipboard. You can use the paste or Ctl_V to insert it into your document.

I connected the 3.3V wire to the Arduino's 3.3V port. Isn't it enought as a power for arduino?

Maybe not. Arduino has 3.3 V but for low current. ESP8266 is powered entirely by 3.3 V and especially Wi-Fi functionality consumes high current. In your other similar topic, I recommended using the Wemos D1 mini board - it has everything you need for programming and operation.

https://www.wemos.cc/en/latest/d1/d1_mini.html

Good luck.

Are you tring to upload this code to Arduino Uno board or to the ESP-01?

Maybe, maybe not, but at the moment your upload has failed, which is not a power issue.
How are you connecting to the PC ? Specifically the TX & RX lines.

If you connected the rest the way it is shown, then your unit should go into 'flash' mode. I usually put a pullup on GPIO 0 and connect it to GND via a Button, which i hold down while i release the 'reset button' to put it into flash mode. That way i can easily switch to flash mode and use normal mode to verify the program is working properly without having to change anything on the breadboard.

That is a rather old version though. (mind you i am still using 2.4.2) Latest is 3.0.2 i think.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.