1.การติดตั้ง ESP32 CP2102 ในArduino IDE
ทำตามขั้นตอนได้ดังนี้:
Arduino IDE ไปที่ File > Preferences จากนั้นในช่อง "Additional Board Manager URLs"
ให้เพิ่ม URL ของ ESP32:
https://dl.espressif.com/dl/package_esp32_index.json,
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
ติดตั้ง ESP32 Board: ไปที่ Tools > Board > Boards Manager
ค้นหา “ESP32” และติดตั้งแพ็คเกจ ESP32 โดย Espressif Systems
เลือกบอร์ด ESP32: ไปที่ Tools > Board และเลือกบอร์ด ESP32 ที่คุณใช้งาน
เชื่อมต่อและอัปโหลดโค้ด: เชื่อมต่อบอร์ด ESP32 กับคอมพิวเตอร์ จากนั้นคุณสามารถเขียนและอัปโหลดโค้ดได้ตามปกติ
Esp32 S2 dev module
2.การติดตั้ง ESP32 CP2102 ใน Arduino IDE
ESP CH340,CP210x,CH9102x
https://www.silabs.com/developers/usb-to-uart-bridge-vcp-drivers?tab=downloads
/// Blink code
#define LED_BUILTIN 2
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(100); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(100); // wait for a second
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(100); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(100); // wait for a second
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(2000); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(2000); // wait for a second
}
Tags:
ESP32,Arduio IDE,NodeMCU,handleRoot,HTML,AsyncWebServer server(80),CH340,CP210x,CH9102x
Web server,handleClient,server send,server on,WiFi.begin ,WiFi.h ,cp2102
ความคิดเห็น
แสดงความคิดเห็น