Hello,
i bought a ESP-01S and i plan to program it using only arduino (Mega 2560)
wiring :
- *ESP-01S:____________ Arduino:
- GND -------------------------- GND
- GP2 -------------------------- Not connected
- GP0 -------------------------- GND
- RX-------------------------- TX (pin 18)
- TX -------------------------- RX (pin 19)
- EN (CHPD) ------------------------ 3.3V
- RST -------------------------- Not connected
- VCC -------------------------- 3.3V
after downloading the package from :
http://arduino.esp8266.com/stable/package_esp8266com_index.json
and installing it, i choose the "Generic ESP8266 Module" board from the Tools -> Board menu.
then i upload this sketch to program it :
#include <ESP8266WiFi.h>
const char* ssid = "That's crazyyyy";
const char* password = "redacted";
void setup() {
Serial.begin(115200);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(1000);
Serial.println("Connecting to WiFi...");
}
Serial.println("Connected to WiFi");
Serial.print("IP address: ");
Serial.println(WiFi.localIP());
}
void loop() {
// Add your code here
}
but i get this error :
Connecting......................................____
_
A fatal esptool.py error occurred: Failed to connect to ESP8266: Timed out waiting for packet header.
can anyone help? thank you