/*
Blink
Turns an LED on for one second, then off for one second, repeatedly.
Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO
it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to
the correct LED pin independent of which board is used.
If you want to know what pin the on-board LED is connected to on your Arduino
model, check the Technical Specs of your board at:
https://www.arduino.cc/en/Main/Products
modified 8 May 2014
by Scott Fitzgerald
modified 2 Sep 2016
by Arturo Guadalupi
modified 8 Sep 2016
by Colby Newman
This example code is in the public domain.
https://www.arduino.cc/en/Tutorial/BuiltInExamples/Blink
*/
#define LED_BUILTIN (13)
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
Serial.begin(9600);
pinMode(LED_BUILTIN, OUTPUT);
pinMode(12, OUTPUT);
// pinMode(13, OUTPUT);
digitalWrite(13, LOW);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(LED_BUILTIN, LOW); // turn the LED on (HIGH is the voltage level)
digitalWrite(12, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED_BUILTIN, HIGH); // turn the LED off by making the voltage LOW
digitalWrite(12, LOW); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
Serial.println("===合宙ESP32C3");
Serial.printf("getHeapSize= %d \n",ESP.getHeapSize());
delay(10);
Serial.printf("getFreeHeap= %d \n",ESP.getFreeHeap());
delay(10);
Serial.printf("getChipRevision= %d \n",ESP.getChipRevision()); // 3
delay(10);
Serial.printf("getChipRevision= %s \n",ESP.getChipModel()); //ESP32-C3
delay(10);
Serial.printf("getChipCores= %d Core\n",ESP.getChipCores()); // 1
delay(10);
Serial.printf("getCpuFreqMHz= %d MHz\n",ESP.getCpuFreqMHz()); //160
delay(10);
// Serial.printf("getSdkVersion= %s \n",ESP.getSdkVersion());
// Serial.printf("getFlashChipSize= %s \n",ESP.getFlashChipSize());
// Serial.printf("getFlashChipSpeed= %s \n",ESP.getFlashChipSpeed());
Serial.printf("getSketchSize= %d bytes\n",ESP.getSketchSize()); //250128
delay(10);
Serial.printf("getFreeSketchSpace= %d bytes\n",ESP.getFreeSketchSpace()); //13631488 bytes
delay(10);
Serial.printf("getSketchMD5= %s \n",ESP.getSketchMD5().c_str());//acaaaa867e2263c1f83c0daef8474855
delay(10);
uint32_t flash_Size = ESP.getFlashChipSize();
Serial.printf("getFlashChipSize= %d \n",flash_Size); //16777216
delay(10);
Serial.printf("getFlashChipSpeed= %d \n",ESP.getFlashChipSpeed()); //80000000
delay(10);
FlashMode_t flash_Mode = ESP.getFlashChipMode();
Serial.printf("Flash mode: %s\n", (flash_Mode == FM_QIO ? "QIO" : flash_Mode == FM_QOUT ? "QOUT" : flash_Mode == FM_DIO ? "DIO" : flash_Mode == FM_DOUT ? "DOUT" : "UNKNOWN"));
delay(1000);
}
https://dl.espressif.com/dl/package_esp32_index.json;https://arduino.me/packages/esp8266.json;
https://arduino.me/a/esp32