I built a 9.9 Hezhou ESP32C3 development board. Due to network reasons, it took a lot of effort to set up the Arduino environment. I will record and share it.
Step 1 Arduino IDE Operation
The Arduino IDE version used is 1.8.9
1.1 Click on the menu bar: File > Preferences
[Additional Development Board Manager URL] Fill in:
https://ghproxy.com/https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
1.2 Tools > Development Board > Development Board Manager
Search for ESP32
and click [Install]. The main reason is that the network will get stuck here.
If everything goes well, congratulations, you've done it. You don't need to read the rest. If you are like me and get stuck while downloading, just exit and use the manual download method below.
Step 2 Download resources manually
Different versions of resources may be different. Here is Arduino 1.8.19 plus ESP32 2.0.11
Manually download resources from Github. My method is rather stupid. Which one reports an error and the download fails? Just download it manually. Then copy it to
C:\Users\用户名\AppData\Local\Arduino15\staging\packages
.
If you can't download it manually, or Github can't be opened at all, then try the one I downloaded. If the version is the same, it should be no problem.
https://download.csdn.net/download/svyee/88449116
The third step, Hello world
#define LED_D4 12
#define LED_D5 13
void setup() {
Serial.begin(115200);
pinMode(LED_D4, OUTPUT);
pinMode(LED_D5, OUTPUT);
}
void loop() {
Serial.println("Hello world!");
digitalWrite(LED_D4, LOW);
digitalWrite(LED_D5, HIGH);
delay(500);
digitalWrite(LED_D4, HIGH);
digitalWrite(LED_D5, LOW);
delay(500);
}
Select the development board as ESP32C3 Dev Module; Flash Mode is DIO
Upload, you can see the two lights on the development board flashing alternately, open the serial monitor, the baud rate is 51200, You can see the output Hello World
and you are done.