realistdream
realistdream

Reputation: 9

Arduino R3 trouble connecting to ESP8266 - Timed Out Error

I am attempting to turn my generic Arduino R3 (an ELEGOO UNO R3) into an IoT device by connecting an ESP8266 ESP-01 WiFi module.

Here are my wiring connection:

GND - GND TXD - RX IO2 - 3.3v (through board) EN - GND (through board) IOD - GND (through board) RXD - TX VCC - 3.3v

When uploading the code I keep getting the error:

'A fatal esptool.py error occurred: Failed to connect to ESP8266: Timed out waiting for packet header'

Here is the code:

#include <ESP8266WiFi.h>

const char* ssid = "";
const char* password = "";

void setup() {
  Serial.begin(115200);
  delay(10);

  // Connect to Wi-Fi
  Serial.println();
  Serial.print("Connecting to ");
  Serial.println(ssid);

  WiFi.begin(ssid, password);

  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }

  Serial.println("");
  Serial.println("WiFi connected");
  Serial.println("IP address: ");
  Serial.println(WiFi.localIP());
}

void loop() {
  // Nothing to do here
}

what do i do?

Upvotes: 0

Views: 42

Answers (0)

Related Questions