Trouble uploading new sketch!

I was working on a code to get the climate in my greenhouse automated. Everything was working fine until yesterday, i uploaded this code:


#include <BH1750.h>
#include <SoftwareSerial.h>
#include <MHZ.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>  
#include "SparkFunHTU21D.h"
#include <DS3231.h>
HTU21D myHumidity;
DS3231  rtc(SDA, SCL);
BH1750 lightMeter;
MHZ co2(6, MHZ14A);
Time t;

#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 32 // OLED display height, in pixels
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT);  

unsigned long prevTime = 0;
int SSD_State = 0;
bool vocht;

void setup() {
  Serial.begin(9600);
  myHumidity.begin();
  rtc.begin();
  lightMeter.begin();

  display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
  display.clearDisplay();
  display.setTextColor(SSD1306_WHITE);

  pinMode(2, OUTPUT);     // R2.4 Verdamper
  pinMode(3, OUTPUT);     // R2.3 Exit Fan
  pinMode(4, OUTPUT);     // R2.2 Luchtcirculatie
  pinMode(5, OUTPUT);     // R2.1 Entry Fan
  pinMode(6, INPUT);      // PWM CO2 Meter

  pinMode(10, OUTPUT);     // R1.4 -
  pinMode(11, OUTPUT);     // R1.3 -
  pinMode(12, OUTPUT);     // R1.2 -

  //RTC Instellen van de TIJD
  rtc.setDOW(FRIDAY);     // Set Day-of-Week to SUNDAY
  rtc.setTime(15, 10, 50);     // Set the time to 12:00:00 (24hr format)
  rtc.setDate(5, 5, 2023);   // Set the date to January 1st, 2014
}

void loop() {

  t = rtc.getTime();
  int ppm_pwm = co2.readCO2PWM();
  float lux = lightMeter.readLightLevel();
  float humd = myHumidity.readHumidity();
  float temp = myHumidity.readTemperature();

Serial.print(SSD_State);
Serial.print("   Vocht: ");
Serial.println(vocht);

if (millis() - prevTime >= 5000) {
    SSD_State = (SSD_State+1)%5;
    Serial.println(SSD_State);
    prevTime = millis();
  }  
  
    // display time 
if (SSD_State == 0){
  display.clearDisplay();
  display.setTextSize(1);
  display.setCursor(0,0);
  display.print("Tijd:");
  display.setTextSize(3);
  display.setCursor(12,11);
  display.print(t.hour);  
  display.setCursor(42,11);
  display.print(":"); 
  display.setCursor(54,11);  
  display.print(t.min);  
  display.display();   
 }
  // display temperature
if (SSD_State == 1) {
  display.clearDisplay();
  display.setTextSize(1);
  display.setCursor(0,0);
  display.print("Temperatuur:");
  display.setTextSize(3);
  display.setCursor(12,11);
  display.print(temp);
  display.print(" ");
  display.setTextSize(1);
  display.setCursor(105,13);
  display.cp437(true);
  display.write(167);
  display.setTextSize(2);
  display.print("C");
  display.display(); 
 }  

  // display humidititty
if (SSD_State == 2){
  display.clearDisplay();
  display.setTextSize(1);
  display.setCursor(0,0);
  display.print("Luchtvochtigheid:");
  display.setTextSize(3);
  display.setCursor(12,11);
  display.print(humd);
  display.print(" ");
  display.setTextSize(1);
  display.setCursor(105,13);
  display.setTextSize(2);
  display.print("%");
  display.display(); 
 }
  // Display CO2 
 if (SSD_State == 3){
  display.clearDisplay();
  display.setTextSize(1);
  display.setCursor(0,0);
  display.print("CO2 gehalte:");
  display.setTextSize(3);
  display.setCursor(12,11);
  display.print(ppm_pwm);   
  display.display();  
 }
  // Display Light intensity
 if (SSD_State == 4){
  display.clearDisplay();
  display.setTextSize(1);
  display.setCursor(0,0);
  display.print("Lichtintensiteit:");
  display.setTextSize(3);
  display.setCursor(12,11);
  display.print(lux);   
  display.display();  
 } 

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ EFFECTIEVE REGELING >\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\//
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

// Luchtbevochter
  if(lux >= 100) {                 //Aanschakelen aan de hand van LICHTSTERKTE
    if(humd <= 78){
      digitalWrite(2, LOW);
      vocht = true;
    }
    if(humd >= 82){
      digitalWrite(2, HIGH);
    }
   else{
     digitalWrite(2, HIGH);
   }
  }

// Entry Fan
  if(lux >= 100){
    digitalWrite(5, LOW);
  }else{
    digitalWrite(5, HIGH);
  }
  
  // Exit Fan
  if(temp >= 29.0 || humd >= 85){
    digitalWrite(3, LOW);
  }else {
    digitalWrite(3, HIGH);
  }  
  
// Luchtcirculatie ventilator
  if(lux >= 100){        //Tijd wanneer ventilator aanstaat
    digitalWrite(4, LOW);
  } else{
    digitalWrite(4, HIGH);
  }  
}

I first made the code for all my sensors including:

  • MHZ-14a
  • HTU21D
  • DS3231
  • BH1750
    OLED display included, then i combined the code with the part that controls all devices. Separatly the codes worked fine. Until i combined them, nothing would work like it was supposed to, but now my biggest problem that i cannot upload a new sketch to the arduino uno R3. Even when the IDE says the new code has been succesfully uploaded, the old code shown above keeps running.

I've mentioned this in another topic, but i thought i'd make a new one since they're different problems now.

Please try this minimal experiment to determine whether a program runs after being uploaded to your board:

  1. Select File > Examples > 01.Basics > Blink from the Arduino IDE menus.
  2. Select Sketch > Upload from the Arduino IDE menus.
  3. Wait for the upload operation to finish successfully.

Do you now see the LED on your Nano board that is marked "L" blinking at 0.5 Hz?

Do you own a second arduino? If so, upload ArduinoISP and burn a new bootloader over to the broken one.

burn bootloaders

Your topic has been moved to a more suitable location on the forum. Installation and Troubleshooting is not for problems with (nor for advice on) your project :wink: See About the Installation & Troubleshooting category.

No, after it says it's done uploading, the old sketch is still running, the arduino switches on and off couple of times and then stays on.
I do not have another arduino to test on unfortenatly, would be hard to replace either way, because its locked in place behind the other electronics.

Please provide a detailed description of what you are observing that makes you think the old sketch is still running.

Please also tell me which version of Arduino IDE are you using (e.g., "2.0.1")? The version is shown on the window title bar and also in the Help > About dialog.

I ask for this information because I want to give you the appropriate instructions for the IDE version you are using.

IDE Version:
Version: 2.0.4
Date: 2023-02-27T16:14:28.576Z
CLI Version: 0.31.0

By uploading any other code like a blink, doesn't change anything. Display and sensors are still updating, serial monitor is the same....

I'm going to ask you to post the full output from the upload when in verbose mode.


:exclamation: NOTE: These instructions will not solve the problem. They are only intended to gather more information which might provide a clue that eventually leads to a solution.


Please do this:

  1. Select File > Preferences from the Arduino IDE menus.
  2. Uncheck the box next to Show verbose output during: compilation
  3. Check the box next to Show verbose output during: ☐ upload.
  4. Click the OK button.
  5. Attempt an upload, as you did before.
  6. Wait for the upload to finish.
  7. Right click on the black "Output" panel at the bottom of the Arduino IDE window.
  8. From the context menu, click Copy All.
  9. Open a forum reply here by clicking the Reply button.
  10. Click the <CODE/> icon on the post composer toolbar.
    This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
    Code tags icon on toolbar
  11. Press Ctrl+V.
    This will paste the compilation output into the code block.
  12. Move the cursor outside of the code tags before you add any additional text to your reply.
  13. Click the Reply button to post the output.

Hope this will be any help.

Sketch uses 778 bytes (2%) of program storage space. Maximum is 32256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.
"C:\Users\Mario\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude" "-CC:\Users\Mario\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf" -v -V -patmega328p -carduino "-PCOM10" -b115200 -D "-Uflash:w:C:\Users\Mario\AppData\Local\Temp\arduino\sketches\4EF8313840F62D785A48E56F40106237/sketch_may3a.ino.hex:i"

avrdude: Version 6.3-20190619
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Users\Mario\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

         Using Port                    : COM10
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200
         AVR Part                      : ATmega328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : Arduino
         Description     : Arduino
         Hardware Version: 3
         Firmware Version: 4.4
         Vtarget         : 0.3 V
         Varef           : 0.3 V
         Oscillator      : 28.800 kHz
         SCK period      : 3.3 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: reading input file "C:\Users\Mario\AppData\Local\Temp\arduino\sketches\4EF8313840F62D785A48E56F40106237/sketch_may3a.ino.hex"
avrdude: writing flash (778 bytes):

Writing | ################################################## | 100% 0.11s

avrdude: 778 bytes of flash written

avrdude done.  Thank you.

Hi,
How are you powering your project?

The MHZ-14a consumes 150mA peak.

Can you program the blink example into your controller, without any hardware connected?

Did I miss it, but have you told us what model Arduino are you using?

PLEASE try your code with version 1.8.19 of the IDE, version 2.0.xxx is in development and has shown to have unexpected bugs.

Thanks.. Tom.. :grinning: :+1: :coffee: :australia:

My project is now being powered via USB cable, else it would be powered by a 12V, 2A adapter.
I have tried uploading it without any hardware connected with my arduino uno R3, but still nothing changes.
So then i tried using the IDE 1.8.19 version and now it does show an error:

Arduino: 1.8.19 (Windows 10), Board:"Arduino Uno"

De schets gebruikt 924 bytes (2%)  programma-opslagruimte. Maximum is 32256 bytes.

Globale variabelen gebruiken 9 bytes (0%) van het dynamisch geheugen. Resteren 2039 bytes voor lokale variabelen. Maximum is 2048 bytes.

C:\Users\Mario\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude -CC:\Users\Mario\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf -v -patmega328p -carduino -PCOM9 -b115200 -D -Uflash:w:C:\Users\Mario\AppData\Local\Temp\arduino_build_890833/Blink.ino.hex:i 



avrdude: Version 6.3-20190619

         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

         Copyright (c) 2007-2014 Joerg Wunsch



         System wide configuration file is "C:\Users\Mario\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"



         Using Port                    : COM9

         Using Programmer              : arduino

         Overriding Baud Rate          : 115200

         AVR Part                      : ATmega328P

         Chip Erase delay              : 9000 us

         PAGEL                         : PD7

         BS2                           : PC2

         RESET disposition             : dedicated

         RETRY pulse                   : SCK

         serial program mode           : yes

         parallel program mode         : yes

         Timeout                       : 200

         StabDelay                     : 100

         CmdexeDelay                   : 25

         SyncLoops                     : 32

         ByteDelay                     : 0

         PollIndex                     : 3

         PollValue                     : 0x53

         Memory Detail                 :



                                  Block Poll               Page                       Polled

           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack

           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------

           eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff

           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff

           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00

           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00

           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00

           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00

           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00

           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00



         Programmer Type : Arduino

         Description     : Arduino

         Hardware Version: 3

         Firmware Version: 4.4

         Vtarget         : 0.3 V

         Varef           : 0.3 V

         Oscillator      : 28.800 kHz

         SCK period      : 3.3 us



avrdude: AVR device initialized and ready to accept instructions



Reading | ################################################## | 100% 0.00s



avrdude: Device signature = 0x1e950f (probably m328p)

avrdude: reading input file "C:\Users\Mario\AppData\Local\Temp\arduino_build_890833/Blink.ino.hex"

avrdude: writing flash (924 bytes):



Writing | ################################################## | 100% 0.13s



avrdude: 924 bytes of flash written

avrdude: verifying flash memory against C:\Users\Mario\AppData\Local\Temp\arduino_build_890833/Blink.ino.hex:

avrdude: load data flash data from input file C:\Users\Mario\AppData\Local\Temp\arduino_build_890833/Blink.ino.hex:

avrdude: input file C:\Users\Mario\AppData\Local\Temp\arduino_build_890833/Blink.ino.hex contains 924 bytes

avrdude: reading on-chip flash data:



Reading | ###############################Er is een fout opgetreden bij het uploaden van de schets

################### | 100% 0.13s



avrdude: verifying ...

avrdude: verification error, first mismatch at byte 0x0000

         0x62 != 0x0c

avrdude: verification error; content mismatch



avrdude done.  Thank you.


Other times i'm getting not syncing error

Arduino: 1.8.19 (Windows 10), Board:"Arduino Uno"

De schets gebruikt 924 bytes (2%)  programma-opslagruimte. Maximum is 32256 bytes.

Globale variabelen gebruiken 9 bytes (0%) van het dynamisch geheugen. Resteren 2039 bytes voor lokale variabelen. Maximum is 2048 bytes.

C:\Users\Mario\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude -CC:\Users\Mario\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf -v -patmega328p -carduino -PCOM9 -b115200 -D -Uflash:w:C:\Users\Mario\AppData\Local\Temp\arduino_build_890833/Blink.ino.hex:i 



avrdude: Version 6.3-20190619

         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

         Copyright (c) 2007-2014 Joerg Wunsch



         System wide configuration file is "C:\Users\Mario\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"



         Using Port                    : COM9

         Using Programmer              : arduino

         Overriding Baud Rate          : 115200

avrdude: ser_drain(): read error: Toegang geweigerd.




avrdude: ser_send(): write error: sorry no info avail

avrdude: ser_drain(): read error: Toegang geweigerd.




avrdude: ser_send(): write error: sorry no info avail

avrdude: ser_drain(): read error: Toegang geweigerd.




avrdude: ser_send(): write error: sorry no info avail

avrdude: ser_recv(): read error: Toegang geweigerd.




avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xe3

avrdude: ser_send(): write error: sorry no info avail

avrdude: ser_recv(): read error: Toegang geweigerd.




de geselecteerde seriële poort 

 bestaat niet of uw board is niet aangesloten.

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0xe3

avrdude: ser_send(): write error: sorry no info avail

avrdude: ser_recv(): read error: Toegang geweigerd.




avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0xe3

avrdude: ser_send(): write error: sorry no info avail

avrdude: ser_recv(): read error: Toegang geweigerd.




avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0xe3

avrdude: ser_send(): write error: sorry no info avail

avrdude: ser_recv(): read error: Toegang geweigerd.




avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0xe3

avrdude: ser_send(): write error: sorry no info avail

avrdude: ser_recv(): read error: Toegang geweigerd.




avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0xe3

avrdude: ser_send(): write error: sorry no info avail

avrdude: ser_recv(): read error: Toegang geweigerd.




avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0xe3

avrdude: ser_send(): write error: sorry no info avail

avrdude: ser_recv(): read error: Toegang geweigerd.




avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0xe3

avrdude: ser_send(): write error: sorry no info avail

avrdude: ser_recv(): read error: Toegang geweigerd.




avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0xe3

avrdude: ser_send(): write error: sorry no info avail

avrdude: ser_recv(): read error: Toegang geweigerd.




avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xe3

avrdude: ser_drain(): read error: Toegang geweigerd.






avrdude done.  Thank you.

Arduino: 1.8.19 (Windows 10), Board:"Arduino Uno"

De schets gebruikt 924 bytes (2%)  programma-opslagruimte. Maximum is 32256 bytes.

Globale variabelen gebruiken 9 bytes (0%) van het dynamisch geheugen. Resteren 2039 bytes voor lokale variabelen. Maximum is 2048 bytes.

C:\Users\Mario\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude -CC:\Users\Mario\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf -v -patmega328p -carduino -PCOM7 -b115200 -D -Uflash:w:C:\Users\Mario\AppData\Local\Temp\arduino_build_577375/Blink.ino.hex:i 



avrdude: Version 6.3-20190619

         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

         Copyright (c) 2007-2014 Joerg Wunsch



         System wide configuration file is "C:\Users\Mario\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"



         Using Port                    : COM7

         Using Programmer              : arduino

         Overriding Baud Rate          : 115200

         AVR Part                      : ATmega328P

         Chip Erase delay              : 9000 us

         PAGEL                         : PD7

         BS2                           : PC2

         RESET disposition             : dedicated

         RETRY pulse                   : SCK

         serial program mode           : yes

         parallel program mode         : yes

         Timeout                       : 200

         StabDelay                     : 100

         CmdexeDelay                   : 25

         SyncLoops                     : 32

         ByteDelay                     : 0

         PollIndex                     : 3

         PollValue                     : 0x53

         Memory Detail                 :



                                  Block Poll               Page                       Polled

           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack

           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------

           eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff

           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff

           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00

           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00

           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00

           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00

           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00

           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00



         Programmer Type : Arduino

         Description     : Arduino

         Hardware Version: 3

         Firmware Version: 4.4

         Vtarget         : 0.3 V

         Varef           : 0.3 V

         Oscillator      : 28.800 kHz

         SCK period      : 3.3 us



avrdude: AVR device initialized and ready to accept instructions



Reading | ################################################## | 100% 0.00s



avrdude: Device signature = 0x1e950f (probably m328p)

avrdude: reading input file "C:\Users\Mario\AppData\Local\Temp\arduino_build_577375/Blink.ino.hex"

avrdude: writing flash (924 bytes):



Writing | ################################################## | 100% 0.13s



avrdude: 924 bytes of flash written

avrdude: verifying flash memory against C:\Users\Mario\AppData\Local\Temp\arduino_build_577375/Blink.ino.hex:

avrdude: load data flash data from input file C:\Users\Mario\AppData\Local\Temp\arduino_build_577375/Blink.ino.hex:

avrdude: input file C:\Users\Mario\AppData\Local\Temp\arduino_build_577375/Blink.ino.hex contains 924 bytes

avrdude: reading on-chip flash data:



Reading | ################################################## | 100% 0.12s



avrdude: verifying ...

avrdude: verification error, first mismatch at byte 0x0000

         0x62 != 0x0c

avrdude: verification error; content mismatch



avrdude done.  Thank you.



de geselecteerde seriële poort 

 bestaat niet of uw board is niet aangesloten.



Dit rapport zou meer informatie bevatten met
"Uitgebreide uitvoer weergeven tijden compilatie"
optie aan in Bestand -> Voorkeuren.

The reason you are getting this error with Arduino IDE 1.x, but not with Arduino IDE 2.x is because you have the "Verify code after upload" option enabled in the Arduino IDE 1.x preferences, but disabled in Arduino IDE 2.x.

You can check this hypothesis by performing the following experiment:

  1. Start Arduino IDE 2.x
  2. Select File > Preferences... from the Arduino IDE menus.
    The "Preferences" dialog will open.
  3. Check the box next to "☐ Verify code after upload" in the "Preferences" dialog.
  4. Click the "OK" button.
  5. Attempt to upload your sketch just as you did before.

The expected result is that the upload in Arduino IDE 2.x will now fail with the same error as you encounter in Arduino IDE 1.x.

The reason why you may have a different setting of this preference in Arduino IDE 2.x vs. 1.x is because the Arduino IDE 2.x changed the default value of the preference from enabled to disabled.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.