Wiring dengan Modul Serial
Wiring dengan USB-TTL (Gunakan yang support 3,3 Volt) atau dapat juga menggunakan Board Arduino
Pilihan Setting Board
Board: “Generic ESP Module”
Flash Mode: “DIO” (Gunakan DOUT jika checksum error)
Flash Frequency: “40MHz”
CPU Frequency: “80 MHz”
Flash Size: “1M (64K SPIFFS)”
Debug Port: “Disabled”
Debug Level: “None”
Reset Method: “ck”
Upload Speed: “115200”
Contoh kode untuk blink (LED pada GPIO0)
/*
* ESP01
* Upload Configuration:
* Generic 8266
* Flash Mode: DOUT (Using: DIO --> checksum Error)
* Debug: None
* Reset: ck
* CPU: 80Mhz
* Flash: 1M (64K)
* Debug Port: Disable
* Flash: 40Mhz
* Upload Speed: 115200
*
* Flashing ESP-01 using Esp8266 Serial Module Board
* Connect GPIO0 to GND
*
* Flash ESP-01 using USB to TTL
* Connect GPIO0 to GND, EN to 3V3, RX-TX, TX-RX
*/
#define D3 0 //GPIO0
#define D4 2 //GPIO2
void setup() {
//GPIO0
pinMode(D3, OUTPUT);
Serial.begin(74880);
}
void loop() {
digitalWrite(D3, LOW); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(D3, HIGH); // turn the LED off by making the voltage LOW Serial.println("LOW");
delay(1000); // wait for a second
Serial.println("OK");
}
Untuk menjalankan hasil programming, lepas kabel IO0 terhadap GND dan lalukan reset (atau cabut pasang modul)
sumber: https://www.diyhobi.com/flash-program-esp-01-using-usb-serial-adapter/