1

So, this is my first experience, I bought new original Uno, trying write some code there and it stuck in running only one sketch.

Tools->Boards is ok, Tools->Ports is ok.

I try created new sketch from File->Examples->01. Basics->Blink and it uploaded successfully, but Uno still running old code and sending to Serial Monitor data (from empty A0, where was potentiometer)

I tried reinstall Arduino App, trying on Windows, tried with only power (just 12v round port, without USB) and it still launch old sketch. When I plug Uno to Mac or Windows it immediately start spaming to Serial Monitor same data.

Clicking, pressing, holding "reset" button with plug or unplug on smth else doesn't work.

==============

Here is my last code, which "stuck" on Uno right now:

const int myPin = A0;  

void setup() {
  Serial.begin(9600);  
  pinMode(3, OUTPUT);  
  pinMode(4, OUTPUT);  
  pinMode(5, OUTPUT);  
}

void loop() {
  int sensorValue = analogRead(myPin);  
  // Serial.print("Sensor value: ");
  Serial.println(sensorValue);  

}

And proof that upload success: enter image description here

Here is code of Blink from examples:

void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(LED_BUILTIN, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(LED_BUILTIN, HIGH);  // turn the LED on (HIGH is the voltage level)
  delay(1000);                      // wait for a second
  digitalWrite(LED_BUILTIN, LOW);   // turn the LED off by making the voltage LOW
  delay(1000);                      // wait for a second
}

And proof that upload success: enter image description here

Here is my Uno without anything but with lighted TX port when I plug it into Mac/Windows (you can see that L/13 bulb light darker than should and I don't know why): enter image description here

And here is unstoppable spaming in Serial Monitor by sketch from first code:

01:57:24.874 -> 430
01:57:24.874 -> 420
01:57:24.874 -> 425
01:57:24.874 -> 435
01:57:24.874 -> 424
01:57:24.874 -> 425
01:57:24.907 -> 425
01:57:24.907 -> 434
01:57:24.907 -> 422
01:57:24.907 -> 425
01:57:24.907 -> 425
01:57:24.907 -> 433
01:57:24.940 -> 420
01:57:24.940 -> 424
01:57:24.940 -> 423
01:57:24.940 -> 431
01:57:24.940 -> 417
01:57:24.940 -> 423
01:57:24.940 -> 422
01:57:24.973 -> 429
01:57:24.973 -> 415
01:57:24.973 -> 421
01:57:24.973 -> 422
01:57:24.973 -> 424
01:57:24.973 -> 416
01:57:25.005 -> 421
01:57:25.005 -> 428
01:57:25.005 -> 421
01:57:25.005 -> 419
01:57:25.005 -> 418
01:57:25.005 -> 426
01:57:25.036 -> 415
01:57:25.036 -> 417
01:57:25.036 -> 417
01:57:25.036 -> 424
01:57:25.036 -> 411
01:57:25.036 -> 416
01:57:25.036 -> 416
01:57:25.069 -> 424
01:57:25.069 -> 410
01:57:25.069 -> 416
01:57:25.069 -> 416
01:57:25.069 -> 423
01:57:25.069 -> 407
01:57:25.101 -> 415

=========== UPD: On IDE v. 1.8.19 I got this

Arduino: 1.8.19 (Mac OS X), Board: "Arduino Uno"

Sketch uses 924 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.
An error occurred while uploading the sketch
avrdude: verification error, first mismatch at byte 0x0002
         0x5d != 0x5c
avrdude: verification error; content mismatch


This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

With checked show verbose during compilation and upload I got more:

Arduino: 1.8.19 (Mac OS X), Board: "Arduino Uno"

/private/var/folders/g4/0ddwtmhx3y97b4nm8m2ns88c0000gn/T/AppTranslocation/9AA61328-BD81-4800-BA6D-7F5DD6005876/d/Arduino.app/Contents/Java/arduino-builder -dump-prefs -logger=machine -hardware /private/var/folders/g4/0ddwtmhx3y97b4nm8m2ns88c0000gn/T/AppTranslocation/9AA61328-BD81-4800-BA6D-7F5DD6005876/d/Arduino.app/Contents/Java/hardware -hardware /Users/mr_belogub/Library/Arduino15/packages -tools /private/var/folders/g4/0ddwtmhx3y97b4nm8m2ns88c0000gn/T/AppTranslocation/9AA61328-BD81-4800-BA6D-7F5DD6005876/d/Arduino.app/Contents/Java/tools-builder -tools /private/var/folders/g4/0ddwtmhx3y97b4nm8m2ns88c0000gn/T/AppTranslocation/9AA61328-BD81-4800-BA6D-7F5DD6005876/d/Arduino.app/Contents/Java/hardware/tools/avr -tools /Users/mr_belogub/Library/Arduino15/packages -built-in-libraries /private/var/folders/g4/0ddwtmhx3y97b4nm8m2ns88c0000gn/T/AppTranslocation/9AA61328-BD81-4800-BA6D-7F5DD6005876/d/Arduino.app/Contents/Java/libraries -libraries /Users/mr_belogub/Documents/Arduino/libraries -fqbn=arduino:avr:uno -vid-pid=2341_0043 -ide-version=10819 -build-path /var/folders/g4/0ddwtmhx3y97b4nm8m2ns88c0000gn/T/arduino_build_275559 -warnings=none -build-cache /var/folders/g4/0ddwtmhx3y97b4nm8m2ns88c0000gn/T/arduino_cache_275921 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=/Users/mr_belogub/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=/Users/mr_belogub/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avrdude.path=/Users/mr_belogub/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=/Users/mr_belogub/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17 -prefs=runtime.tools.arduinoOTA.path=/Users/mr_belogub/Library/Arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=/Users/mr_belogub/Library/Arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -verbose /private/var/folders/g4/0ddwtmhx3y97b4nm8m2ns88c0000gn/T/AppTranslocation/9AA61328-BD81-4800-BA6D-7F5DD6005876/d/Arduino.app/Contents/Java/examples/01.Basics/Blink/Blink.ino
/private/var/folders/g4/0ddwtmhx3y97b4nm8m2ns88c0000gn/T/AppTranslocation/9AA61328-BD81-4800-BA6D-7F5DD6005876/d/Arduino.app/Contents/Java/arduino-builder -compile -logger=machine -hardware /private/var/folders/g4/0ddwtmhx3y97b4nm8m2ns88c0000gn/T/AppTranslocation/9AA61328-BD81-4800-BA6D-7F5DD6005876/d/Arduino.app/Contents/Java/hardware -hardware /Users/mr_belogub/Library/Arduino15/packages -tools /private/var/folders/g4/0ddwtmhx3y97b4nm8m2ns88c0000gn/T/AppTranslocation/9AA61328-BD81-4800-BA6D-7F5DD6005876/d/Arduino.app/Contents/Java/tools-builder -tools /private/var/folders/g4/0ddwtmhx3y97b4nm8m2ns88c0000gn/T/AppTranslocation/9AA61328-BD81-4800-BA6D-7F5DD6005876/d/Arduino.app/Contents/Java/hardware/tools/avr -tools /Users/mr_belogub/Library/Arduino15/packages -built-in-libraries /private/var/folders/g4/0ddwtmhx3y97b4nm8m2ns88c0000gn/T/AppTranslocation/9AA61328-BD81-4800-BA6D-7F5DD6005876/d/Arduino.app/Contents/Java/libraries -libraries /Users/mr_belogub/Documents/Arduino/libraries -fqbn=arduino:avr:uno -vid-pid=2341_0043 -ide-version=10819 -build-path /var/folders/g4/0ddwtmhx3y97b4nm8m2ns88c0000gn/T/arduino_build_275559 -warnings=none -build-cache /var/folders/g4/0ddwtmhx3y97b4nm8m2ns88c0000gn/T/arduino_cache_275921 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=/Users/mr_belogub/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=/Users/mr_belogub/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avrdude.path=/Users/mr_belogub/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=/Users/mr_belogub/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17 -prefs=runtime.tools.arduinoOTA.path=/Users/mr_belogub/Library/Arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=/Users/mr_belogub/Library/Arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -verbose /private/var/folders/g4/0ddwtmhx3y97b4nm8m2ns88c0000gn/T/AppTranslocation/9AA61328-BD81-4800-BA6D-7F5DD6005876/d/Arduino.app/Contents/Java/examples/01.Basics/Blink/Blink.ino
Using board 'uno' from platform in folder: /Users/mr_belogub/Library/Arduino15/packages/arduino/hardware/avr/1.8.6
Using core 'arduino' from platform in folder: /Users/mr_belogub/Library/Arduino15/packages/arduino/hardware/avr/1.8.6
Detecting libraries used...
/Users/mr_belogub/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/Users/mr_belogub/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino -I/Users/mr_belogub/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/variants/standard /var/folders/g4/0ddwtmhx3y97b4nm8m2ns88c0000gn/T/arduino_build_275559/sketch/Blink.ino.cpp -o /dev/null
Generating function prototypes...
/Users/mr_belogub/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/Users/mr_belogub/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino -I/Users/mr_belogub/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/variants/standard /var/folders/g4/0ddwtmhx3y97b4nm8m2ns88c0000gn/T/arduino_build_275559/sketch/Blink.ino.cpp -o /var/folders/g4/0ddwtmhx3y97b4nm8m2ns88c0000gn/T/arduino_build_275559/preproc/ctags_target_for_gcc_minus_e.cpp
/private/var/folders/g4/0ddwtmhx3y97b4nm8m2ns88c0000gn/T/AppTranslocation/9AA61328-BD81-4800-BA6D-7F5DD6005876/d/Arduino.app/Contents/Java/tools-builder/ctags/5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives /var/folders/g4/0ddwtmhx3y97b4nm8m2ns88c0000gn/T/arduino_build_275559/preproc/ctags_target_for_gcc_minus_e.cpp
Compiling sketch...
/Users/mr_belogub/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/Users/mr_belogub/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino -I/Users/mr_belogub/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/variants/standard /var/folders/g4/0ddwtmhx3y97b4nm8m2ns88c0000gn/T/arduino_build_275559/sketch/Blink.ino.cpp -o /var/folders/g4/0ddwtmhx3y97b4nm8m2ns88c0000gn/T/arduino_build_275559/sketch/Blink.ino.cpp.o
Compiling libraries...
Compiling core...
Using precompiled core: /var/folders/g4/0ddwtmhx3y97b4nm8m2ns88c0000gn/T/arduino_cache_275921/core/core_arduino_avr_uno_7dc84736bec69d7a3f526b3465643c6f.a
Linking everything together...
/Users/mr_belogub/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-gcc -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o /var/folders/g4/0ddwtmhx3y97b4nm8m2ns88c0000gn/T/arduino_build_275559/Blink.ino.elf /var/folders/g4/0ddwtmhx3y97b4nm8m2ns88c0000gn/T/arduino_build_275559/sketch/Blink.ino.cpp.o /var/folders/g4/0ddwtmhx3y97b4nm8m2ns88c0000gn/T/arduino_build_275559/../arduino_cache_275921/core/core_arduino_avr_uno_7dc84736bec69d7a3f526b3465643c6f.a -L/var/folders/g4/0ddwtmhx3y97b4nm8m2ns88c0000gn/T/arduino_build_275559 -lm
/Users/mr_belogub/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 /var/folders/g4/0ddwtmhx3y97b4nm8m2ns88c0000gn/T/arduino_build_275559/Blink.ino.elf /var/folders/g4/0ddwtmhx3y97b4nm8m2ns88c0000gn/T/arduino_build_275559/Blink.ino.eep
/Users/mr_belogub/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy -O ihex -R .eeprom /var/folders/g4/0ddwtmhx3y97b4nm8m2ns88c0000gn/T/arduino_build_275559/Blink.ino.elf /var/folders/g4/0ddwtmhx3y97b4nm8m2ns88c0000gn/T/arduino_build_275559/Blink.ino.hex
/Users/mr_belogub/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-size -A /var/folders/g4/0ddwtmhx3y97b4nm8m2ns88c0000gn/T/arduino_build_275559/Blink.ino.elf
Sketch uses 924 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.
/Users/mr_belogub/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/bin/avrdude -C/Users/mr_belogub/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf -v -patmega328p -carduino -P/dev/cu.usbmodem1101 -b115200 -D -Uflash:w:/var/folders/g4/0ddwtmhx3y97b4nm8m2ns88c0000gn/T/arduino_build_275559/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 "/Users/mr_belogub/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf"
         User configuration file is "/Users/mr_belogub/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/cu.usbmodem1101
         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 "/var/folders/g4/0ddwtmhx3y97b4nm8m2ns88c0000gn/T/arduino_build_275559/Blink.ino.hex"
avrdude: writing flash (924 bytes):

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

avrdude: 924 bytes of flash written
avrdude: verifying flash memory against /var/folders/g4/0ddwtmhx3y97b4nm8m2ns88c0000gn/T/arduino_build_275559/Blink.ino.hex:
avrdude: load data flash data from input file /var/folders/g4/0ddwtmhx3y97b4nm8m2ns88c0000gn/T/arduino_build_275559/Blink.ino.hex:
avrdude: input file /var/folders/g4/0ddwtmhx3y97b4nm8m2ns88c0000gn/T/arduino_build_275559/Blink.ino.hex contains 924 bytes
avrdude: reading on-chip flash data:

An error occurred while uploading the sketch
Reading | ################################################## | 100% 0.13s

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0002
         0x5d != 0x5c
avrdude: verification error; content mismatch

avrdude done.  Thank you.


7
  • @jsotola I thing it strange coz it have not only code and output but more additional info, but ok, i removed and paste like text Jan 2 at 0:07
  • if you have additional info that cannot be added any other way than a picture, then it is ok to add a picture
    – jsotola
    Jan 2 at 0:36
  • Are you sure the upload was successful? Did you really click "Upload", and not "Check"? I doubt that, because the old sketch still runs, and there can only be one sketch on an Arduino. You might want to repeat the upload and edit your question to show us the resulting log of the upload. Jan 2 at 8:36
  • @thebusybee yeah, I'm sure, in question was a screenshots but jsotola ask me to remove it. Now I back screenshots, is it that you ask? Jan 2 at 12:16
  • Since I don't hat IDE 2, I cannot say for sure, but I'd expect a preference to show verbose compiler and upload logs. Please enable that and copy the log as text into your question. A popup message is no log. -- Do you have more than one Arduino? If so, are both connected? Jan 2 at 12:48

2 Answers 2

1

So, my solution is: burn new bootloader

I bought: USBASP ISP-AVR V2 (Programmer) - 139 UAH / 3.65 USD
10pin to 6pin connector - 22 UAH / 0.58 USD
(cable was with programmer)

enter image description here

I connect programmer to cable with 10pin female, other 10pin female to 10pin/6pin connector, connector to 6 alone pins on Arduino, Arduino to PC

Install drivers, via IDE choose Tools->Burn Bootloader

And voilà!

0

It looks like your upload failed:

avrdude: verifying flash memory against /var/folders/g4/0ddwtmhx3y97b4nm8m2ns88c0000gn/T/arduino_build_275559/Blink.ino.hex:
avrdude: load data flash data from input file /var/folders/g4/0ddwtmhx3y97b4nm8m2ns88c0000gn/T/arduino_build_275559/Blink.ino.hex:
avrdude: input file /var/folders/g4/0ddwtmhx3y97b4nm8m2ns88c0000gn/T/arduino_build_275559/Blink.ino.hex contains 924 bytes
avrdude: reading on-chip flash data:

An error occurred while uploading the sketch
Reading | ################################################## | 100% 0.13s

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0002
         0x5d != 0x5c
avrdude: verification error; content mismatch

This was possibly related to your first sketch outputting to serial constantly. In future I suggest building in a delay before sending data constantly to serial (eg. delay(500)).

Burning a new bootloader removed the problem sketch.

Instead you could have held down the Reset button until the uploading started, and then released it. That would stop the original sketch from running.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.