ho problemi nel caricare lo sketch in arduino. Dispongo di 3 arduino (1Arduino Uno, 2Arduino Nano), gli arduino Nano sono sulla COM 6 invece l'Uno è sulla COM 5. Sull'Arduino Uno lo sketch viene caricato tranquillamente, invece su entrambi i Nano mi dà quest'errore:
*Arduino:1.8.19 (Windows 10), Scheda:"Arduino Nano, ATmega328P"
Lo sketch usa 1124 byte (3%) dello spazio disponibile per i programmi. Il massimo è 30720 byte.
Le variabili globali usano 9 byte (0%) di memoria dinamica, lasciando altri 2039 byte liberi per le variabili locali. Il massimo è 2048 byte.
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x0d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x0d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x0d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x0d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x0d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x0d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x0d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x0d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x0d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x0d
Problem uploading to board. See https://support.arduino.cc/hc/en-us/sections/360003198300 for suggestions.
Questo report potrebbe essere più ricco di informazioni abilitando l'opzione
"Mostra un output dettagliato durante la compilazione"
in "File -> Impostazioni"
*
Il codice:
int val = 0; //valore pulsante
void setup() {
pinMode(10, OUTPUT); //relè
pinMode(12, INPUT); //pulsante
pinMode(8, OUTPUT); //led
pinMode(8, HIGH); //accendo il led
delay (2000); //per 2 secondi
pinMode(8, LOW); //spengo il led
}
void loop() {
digitalWrite(10, LOW); //bobina normalmente con corrente (NC del relè)
val = digitalRead(12); //legge il valore pulsante
if (val == HIGH) { //quanto il pulsante è premuto
digitalWrite(10, HIGH); //attiva il relè, bobina senza corrente
delay(75); //aspetta 75 ms (tempo attesa massimo 100ms) (tempo attesa minimo 40ms)
}
else digitalWrite(10, LOW); // se il pulsante non è premuto mantieni la corrente sulla bobina
}
Ho provato ad eseguire i metodi che suggerisce arduino sul sito di aiuto, ma non ho avuto riscontri positivi.
Uso la versione dell'IDE del Microsoft Store nella versione 1.8.57.0 (dato del Microsoft Store). Grazie in anticipo