I'm doing a project with ESP8266-01. This is how I connected it with PL2303:
PL2303 ---> ESP8266
3.3V ---> VCC, CH_PD
TXD ---> RX
RXD ---> TX
GND ---> GPIO0, GND
Next, I opened Arduino IDE (version 1.8.19) and added this code to my sketch (I'm using esp8266 library version 2.1.0):
#include <ESP8266WiFi.h>
const char *ssid = "ESP AP";
const char *password = "12345";
void setup() {
Serial.begin(115200);
WiFi.softAP(ssid, password);
Serial.print("Access Point: ");
Serial.print(ssid);
Serial.println(" started");
Serial.print("IP address: ");
Serial.println(WiFi.softAPIP());
}
void loop() {}
These are my selections on the Tool tab:
Board: "Generic ESP8266 Module"
Upload Speed: "115200"
CPU Frequency: "80 MHz"
Flash Size: "512K(64K SPIFFS)"
Flash Mode: "DIO"
Flash Frequency: "40 MHz"
Upload Using: "Serial"
Reset Method: "ck"
Debug port: "Disabled"
Debug Level: "None"
Port: "COM13" (my PL2303 COM port)
Programmer: No programmers available for this board
Then I connected my PL2303 to my computer (Windows 10) and hit Upload. It compiled just fine, but I got this logged on my console:
Sketch uses 233067 bytes (53%) of program storage space. Maximum is 434160 bytes.
Global variables use 31920 bytes (38%) of dynamic memory, leaving 50000 bytes for local
variables.
Maximum is 81920 bytes.
warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed
error: espcomm_upload_mem failed
What should I do now to fix this error?
Update: I switched ESP8266v1 with NodeMCU-01 CH340. I'm still using the above sketch to upload to my board. It uploads without error, but I can't see any results like the wifi network created by that sketch (I mean the one with the SSID "ESP AP" but I only see a weird wifi network named "FaryLink_(with a few numbers)" and I think that maybe the wifi network of NodeMCU but that doesn't what I really want) or stuff printed on Serial Monitor. On the Tool tab, I set things up like this (esp8266 library version 3.0.2, Arduino version 1.8.18):
Board:"NodeMCU 1.0 (ESP-12E Module)"
Builtin Led:"2"
Upload Speed:"115200"
CPU Frequency:"80 MHz"
Flash Size:"4MB(FS:2MB OTA:~1019)"
Debug port:"Serial"
Debug Level:"None"
IwIP Variant:"v2 Lower Memory"
VTables:"Flash"
C++ Exceptions:"Disabled (new aborts on oom)"
Stack Protection:"Disabled"
Erase Flash:"Only Sketch"
SSL Support:"All SSL ciphers (most compatible)"
MMU:"32KB cache + 32KB IRAM (balanced)"
Non-32-Bit Access:"Use pgm_read macros for IRAM/PROGMEM"
Port:"COM14"
Anyone can help me solving my problem?