I'm getting this error each time i try to upload a sketch
Flashing with command:C:/Users/berze/.arduino-create/esp32/esptool_py/4.5.1/esptool.exe --chip esp32 --port COM3 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size 4MB 0x1000 C:/Users/berze/AppData/Local/Temp/extrafiles1281502562/POTENCIA_dec11a.bootloader.bin 0x8000 C:/Users/berze/AppData/Local/Temp/extrafiles1281502562/POTENCIA_dec11a.partitions.bin 0xe000 C:/Users/berze/AppData/Local/Temp/extrafiles1281502562/tools/partitions/boot_app0.bin 0x10000 C:/Users/berze/AppData/Local/Temp/arduino-create-agent1945883738/POTENCIA_dec11a.bin
usage: esptool write_flash [-h] [--erase-all]
[--flash_freq {keep,80m,60m,48m,40m,30m,26m,24m,20m,16m,15m,12m}]
[--flash_mode {keep,qio,qout,dio,dout}]
[--flash_size {detect,keep,256KB,512KB,1MB,2MB,2MB-c1,4MB,4MB-c1,8MB,16MB,32MB,64MB,128MB}]
[--spi-connection SPI_CONNECTION] [--no-progress]
[--verify] [--encrypt]
[--encrypt-files <address> <filename> [<address> <filename> ...]]
[--ignore-flash-encryption-efuse-setting] [--force]
[--compress | --no-compress]
<address> <filename> [<address> <filename> ...]
esptool write_flash: error: argument <address> <filename>: [Errno 2] No such file or directory: 'C:/Users/berze/AppData/Local/Temp/extrafiles1281502562/POTENCIA_dec11a.bootloader.bin'
Executing command: exit status 2
this is the code im trying to upload:
/*
Sketch generated by the Arduino IoT Cloud Thing "Untitled"
https://create.arduino.cc/cloud/things/72aad8c3-b503-4801-982c-051a15eddf45
Arduino IoT Cloud Variables description
The following variables are automatically generated and updated when changes are made to the Thing
float freq_Fase_A;
float freq_Fase_B;
float freq_Fase_C;
bool outRele;
bool relevador;
Variables which are marked as READ/WRITE in the Cloud Thing will also have functions
which are called when their values are changed from the Dashboard.
These functions are generated with the Thing and added at the end of this sketch.
*/
#include "thingProperties.h"
#define IN_FASE_A 25
#define IN_FASE_B 26
#define IN_FASE_C 27
void TaskFreq();
void contarFreqA();
void contarFreqB();
void contarFreqC();
const unsigned long intervaloMedicion = 1000; // Intervalo de medición en milisegundos
volatile int contadorCambiosA = 0, contadorCambiosB = 0, contadorCambiosC = 0; // Contador de cambios de estado (volátil para uso en interrupciones)
unsigned long tiempoActual, tiempoAnterior = 0 ;
bool fasesListas = false;
void setup() {
// Initialize serial and wait for port to open:
Serial.begin(9600);
// This delay gives the chance to wait for a Serial Monitor without blocking if none is found
delay(1500);
pinMode(IN_FASE_A, INPUT);
pinMode(IN_FASE_B, INPUT);
pinMode(IN_FASE_C, INPUT);
pinMode(2, OUTPUT);
attachInterrupt(digitalPinToInterrupt(IN_FASE_A), contarFreqA, RISING);
attachInterrupt(digitalPinToInterrupt(IN_FASE_B), contarFreqB, RISING);
attachInterrupt(digitalPinToInterrupt(IN_FASE_C), contarFreqC, RISING);
//xTaskCreate(TaskFreqA, "TFA", 1024, NULL, 1, NULL); // Core 1
//xTaskCreate(TaskFreqB, "TFB", 1024, NULL, 1, NULL); // Core 1
//xTaskCreate(TaskFreqC, "TFC", 1024, NULL, 1, NULL); // Core 1
// Defined in thingProperties.h
initProperties();
// Connect to Arduino IoT Cloud
ArduinoCloud.begin(ArduinoIoTPreferredConnection);
/*
The following function allows you to obtain more information
related to the state of network and IoT Cloud connection and errors
the higher number the more granular information you’ll get.
The default is 0 (only errors).
Maximum is 4
*/
setDebugMessageLevel(2);
ArduinoCloud.printDebugInfo();
}
void loop() {
ArduinoCloud.update();
// Your code here
tiempoActual = millis();
TaskFreq();
}
void onRelevadorChange() {
if (freq_Fase_A > 59 && freq_Fase_B > 59 && freq_Fase_C > 59){
digitalWrite(2, HIGH);
outRele = true;
}
}
void contarFreqA(){
contadorCambiosA++;
}
void contarFreqB(){
contadorCambiosB++;
}
void contarFreqC(){
contadorCambiosC++;
}
void TaskFreq(){
if (tiempoActual - tiempoAnterior >= intervaloMedicion) {
//float freq_Fase_A = (float)contadorCambiosA * 1000 / intervaloMedicion; // Cálculo de la frecuencia
freq_Fase_A = 60;
//float freq_Fase_B = (float)contadorCambiosB * 1000 / intervaloMedicion; // Cálculo de la frecuencia
freq_Fase_B = 60;
//float freq_Fase_C = (float)contadorCambiosC * 1000 / intervaloMedicion; // Cálculo de la frecuencia
freq_Fase_C = 60;
contadorCambiosA = 0; // Reinicia el contador
contadorCambiosB = 0; // Reinicia el contador
contadorCambiosC = 0; // Reinicia el contador
tiempoAnterior = tiempoActual;
}
vTaskDelay(100 / portTICK_PERIOD_MS);
}