I need to upload this code
#include <Wire.h>
#include <SparkFun_RV8803.h> // Get the library here: http://librarymanager/All#SparkFun_RV-8803
RV8803 rtc;
void setup()
{
Wire.begin(17, 16); // Start I2C on SDA = GPIO17, SCL = GPIO16
Serial.begin(115200);
Serial.println("Read Time from RTC Example");
if (rtc.begin() == false)
{
Serial.println("Something went wrong, check wiring");
while (1);
}
Serial.println("RTC online!");
}
void loop()
{
if (rtc.updateTime() == true) // Updates the time variables from RTC
{
String currentDate = rtc.stringDate(); // Get the current date in dd/mm/yyyy format
currentDate.replace("/", "-"); // Replace '/' with '-'
String currentTime = rtc.stringTime(); // Get the time
Serial.print(currentDate); // Print the date
Serial.print(" "); // Print a space
Serial.println(currentTime); // Print the time
}
else
{
Serial.print("RTC read failed"); // Error message if time update fails
}
delay(1000); // Wait for 1 second before updating again
}
But WHILE UPLOADING, I am getting this
Sketch uses 232370 bytes (17%) of program storage space. Maximum is 1310720 bytes.
Global variables use 12824 bytes (3%) of dynamic memory, leaving 314856 bytes for local variables. Maximum is 327680 bytes.
esptool.py v4.6
Serial port COM15
Connecting...
Chip is ESP32-C6FH4 (QFN32) (revision v0.0)
Features: WiFi 6, BT 5, IEEE802.15.4
Crystal is 40MHz
MAC: 40:4c:ca:46:f0:24:ff:fe
Uploading stub...
Running stub...
Stub running...
A fatal error occurred: Unable to verify flash chip connection (No serial data received.).
Failed uploading: uploading error: exit status 2