The arduino doesn’t work: simple program upload but not running

Actually I presumed OP would use the same LED/resistor of the original circuit. But also didn´t know pin 13 had a resistor in the past. So, thanks!

But yes sorry, all upload code were failed, I also try with something with Serial.printI() and it fails.

Turn on verbose output for compiling and upload in your preferences then try the Blink sketch again.

After uploading it copy the full message from the bottom of the screen and post it here again in
< CODE/ > tags

Using board 'uno' from platform in folder: /Users/chloe/Library/Arduino15/packages/arduino/hardware/avr/1.8.6
Using core 'arduino' from platform in folder: /Users/chloe/Library/Arduino15/packages/arduino/hardware/avr/1.8.6
Detecting libraries used...
/Users/chloe/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=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/Users/chloe/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino -I/Users/chloe/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/variants/standard /private/var/folders/nn/3glhgr3j7hq9dt7rpd6sks840000gn/T/arduino/sketches/9F7D32F12B8E32531B4055CD3194B11A/sketch/Blink.ino.cpp -o /dev/null
Generating function prototypes...
/Users/chloe/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=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/Users/chloe/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino -I/Users/chloe/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/variants/standard /private/var/folders/nn/3glhgr3j7hq9dt7rpd6sks840000gn/T/arduino/sketches/9F7D32F12B8E32531B4055CD3194B11A/sketch/Blink.ino.cpp -o /private/var/folders/nn/3glhgr3j7hq9dt7rpd6sks840000gn/T/arduino/sketches/9F7D32F12B8E32531B4055CD3194B11A/preproc/ctags_target_for_gcc_minus_e.cpp
/Users/chloe/Library/Arduino15/packages/builtin/tools/ctags/5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives /private/var/folders/nn/3glhgr3j7hq9dt7rpd6sks840000gn/T/arduino/sketches/9F7D32F12B8E32531B4055CD3194B11A/preproc/ctags_target_for_gcc_minus_e.cpp
Compilation du croquis...
/Users/chloe/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=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/Users/chloe/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino -I/Users/chloe/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/variants/standard /private/var/folders/nn/3glhgr3j7hq9dt7rpd6sks840000gn/T/arduino/sketches/9F7D32F12B8E32531B4055CD3194B11A/sketch/Blink.ino.cpp -o /private/var/folders/nn/3glhgr3j7hq9dt7rpd6sks840000gn/T/arduino/sketches/9F7D32F12B8E32531B4055CD3194B11A/sketch/Blink.ino.cpp.o
Compiling libraries...
Compiling core...
Using precompiled core: /private/var/folders/nn/3glhgr3j7hq9dt7rpd6sks840000gn/T/arduino/cores/arduino_avr_uno_d3704327e7059f7a188ba0f60ae9cb17/core.a
Linking everything together...
/Users/chloe/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 /private/var/folders/nn/3glhgr3j7hq9dt7rpd6sks840000gn/T/arduino/sketches/9F7D32F12B8E32531B4055CD3194B11A/Blink.ino.elf /private/var/folders/nn/3glhgr3j7hq9dt7rpd6sks840000gn/T/arduino/sketches/9F7D32F12B8E32531B4055CD3194B11A/sketch/Blink.ino.cpp.o /private/var/folders/nn/3glhgr3j7hq9dt7rpd6sks840000gn/T/arduino/sketches/9F7D32F12B8E32531B4055CD3194B11A/../../cores/arduino_avr_uno_d3704327e7059f7a188ba0f60ae9cb17/core.a -L/private/var/folders/nn/3glhgr3j7hq9dt7rpd6sks840000gn/T/arduino/sketches/9F7D32F12B8E32531B4055CD3194B11A -lm
/Users/chloe/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 /private/var/folders/nn/3glhgr3j7hq9dt7rpd6sks840000gn/T/arduino/sketches/9F7D32F12B8E32531B4055CD3194B11A/Blink.ino.elf /private/var/folders/nn/3glhgr3j7hq9dt7rpd6sks840000gn/T/arduino/sketches/9F7D32F12B8E32531B4055CD3194B11A/Blink.ino.eep
/Users/chloe/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy -O ihex -R .eeprom /private/var/folders/nn/3glhgr3j7hq9dt7rpd6sks840000gn/T/arduino/sketches/9F7D32F12B8E32531B4055CD3194B11A/Blink.ino.elf /private/var/folders/nn/3glhgr3j7hq9dt7rpd6sks840000gn/T/arduino/sketches/9F7D32F12B8E32531B4055CD3194B11A/Blink.ino.hex

/Users/chloe/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-size -A /private/var/folders/nn/3glhgr3j7hq9dt7rpd6sks840000gn/T/arduino/sketches/9F7D32F12B8E32531B4055CD3194B11A/Blink.ino.elf
Le croquis utilise 924 octets (2%) de l'espace de stockage de programmes. Le maximum est de 32256 octets.
Les variables globales utilisent 9 octets (0%) de mémoire dynamique, ce qui laisse 2039 octets pour les variables locales. Le maximum est de 2048 octets.
"/Users/chloe/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/bin/avrdude" "-C/Users/chloe/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf" -v -V -patmega328p -carduino "-P/dev/cu.usbmodem21301" -b115200 -D "-Uflash:w:/private/var/folders/nn/3glhgr3j7hq9dt7rpd6sks840000gn/T/arduino/sketches/9F7D32F12B8E32531B4055CD3194B11A/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/chloe/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf"
         User configuration file is "/Users/chloe/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/cu.usbmodem21301
         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 "/private/var/folders/nn/3glhgr3j7hq9dt7rpd6sks840000gn/T/arduino/sketches/9F7D32F12B8E32531B4055CD3194B11A/Blink.ino.hex"
avrdude: writing flash (924 bytes):

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

avrdude: 924 bytes of flash written

avrdude done.  Thank you.

This indicates that the code is compiling and loading successfully.
It looks like you used Blink.ino when you generated this.
Is the on board led blinking?

Yes, but the led blink 3 times very fast, infinitely, like before uploading the code. It does not blink as requested in the code.

In Preferences, please check the box which says "Verify Code after Upload" and see what the verbose output indicates when that is checked.

There is indeed a error here:

avrdude: verification error, first mismatch at byte 0x0000
         0x62 != 0x0c
avrdude: verification error; content mismatch
Failed uploading: uploading error: exit status 1

Hi @ada
It looks like you are using the 2.0.xxx IDE.

Load the 1.8.19 IDE and see if it works.

What OS are you using?

Tom.. :smiley: :+1: :coffee: :australia:

I will check in a few hours, my mac Os is Monterey version 12.0.1 :slightly_smiling_face:

This is an indication of a problem with the bootloader code on the AT328.

https://forum.arduino.cc/t/solved-verification-error-content-mismatch/436352

You can either try to burn a new bootloader using another Arduino or a USBASP programmer. There are plenty of guides to be found online.
Alternatively, since you have a socketed AT328 on your board, you can purchase a new chip which is programmed with the bootloader. Not all AT328 chips are sold this way, so make certain of what you are buying.

I changed the AT328 and It actually works now. Thanks you all !

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