My arduino uno is uploading but not working

Hello there I am new in arduino field. I have been working on it for 4 months now and it was working correctly. but one day when I try to install library it
didn't work due to the link I save the library has Arabic alphabet I change the folder location and tried to do simulation in protus. it worked in protus but in real life it doesn't work even though it said uploading complete could you please help me??

Welcome to the forum

What is "it" and in what way does "it" not work ?

Please post your sketch, using code tags when you do

it" mean Arduino IDE" while using library. but that doesn't matter now.


.now when I upoload this code it say uploading complete but in serial monitor it show me the values of sensors I used before change the location
> اقتباس فقرة

Hi @ahmed_alhajri321. Please try this experiment and then report back with the results:


:exclamation: This procedure is not intended to solve the problem. The purpose is to gather more information.


  1. Select File > Preferences... (or Arduino IDE > Settings... for macOS users) from the Arduino IDE menus.
    The "Preferences" dialog will open.
  2. Uncheck the box next to Show verbose output during: compile in the "Preferences" dialog.
  3. Check the box next to Show verbose output during: ☐ upload.
  4. Check the box next to ☐ Verify code after upload.
  5. Click the "OK" button.
    The "Preferences" dialog will close.
  6. Attempt an upload, as you did before.

Now please reply here on the forum thread with the following information:

  • Did the upload process succeed this time?
  • If the upload failed, the full text of the upload output, as shown in the "Output" panel at the bottom of the Arduino IDE window.


I did what you told me but it is still uploading and showing the previous sensors sketch I did

From your screenshot, you seem not to have done these steps

  1. Check the box next to Show verbose output during: ☐ upload.
  2. Check the box next to ☐ Verify code after upload.

Hi, @ahmed_alhajri321
Welcome to the forum.
Please check that the circled boxes are ticked.

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

sweat_smile: ok sorry for that now I ticks them and it show me error

it is better see the error from the screenshots




The error where you can copy it.


FQBN: arduino:avr:uno
Using board 'uno' from platform in folder: C:\Users\Ahmed\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6
Using core 'arduino' from platform in folder: C:\Users\Ahmed\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6

Detecting libraries used...
C:\Users\Ahmed\AppData\Local\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 -IC:\Users\Ahmed\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\Ahmed\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard C:\Users\Ahmed\AppData\Local\arduino\sketches\441CD5E6AFD18EE6702CA2A8C2277DFA\sketch\sketch_feb13a.ino.cpp -o nul
Generating function prototypes...
C:\Users\Ahmed\AppData\Local\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 -IC:\Users\Ahmed\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\Ahmed\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard C:\Users\Ahmed\AppData\Local\arduino\sketches\441CD5E6AFD18EE6702CA2A8C2277DFA\sketch\sketch_feb13a.ino.cpp -o C:\Users\Ahmed\AppData\Local\Temp\2184441523\sketch_merged.cpp
C:\Users\Ahmed\AppData\Local\Arduino15\packages\builtin\tools\ctags\5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives C:\Users\Ahmed\AppData\Local\Temp\2184441523\sketch_merged.cpp
Compiling sketch...
"C:\\Users\\Ahmed\\AppData\\Local\\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 "-IC:\\Users\\Ahmed\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\Ahmed\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "C:\\Users\\Ahmed\\AppData\\Local\\arduino\\sketches\\441CD5E6AFD18EE6702CA2A8C2277DFA\\sketch\\sketch_feb13a.ino.cpp" -o "C:\\Users\\Ahmed\\AppData\\Local\\arduino\\sketches\\441CD5E6AFD18EE6702CA2A8C2277DFA\\sketch\\sketch_feb13a.ino.cpp.o"
Compiling libraries...
Compiling core...
Using precompiled core: C:\Users\Ahmed\AppData\Local\arduino\cores\arduino_avr_uno_25f5add4ae28ea76ffd00caafc06d463\core.a
Linking everything together...
"C:\\Users\\Ahmed\\AppData\\Local\\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 "C:\\Users\\Ahmed\\AppData\\Local\\arduino\\sketches\\441CD5E6AFD18EE6702CA2A8C2277DFA/sketch_feb13a.ino.elf" "C:\\Users\\Ahmed\\AppData\\Local\\arduino\\sketches\\441CD5E6AFD18EE6702CA2A8C2277DFA\\sketch\\sketch_feb13a.ino.cpp.o" "C:\\Users\\Ahmed\\AppData\\Local\\arduino\\sketches\\441CD5E6AFD18EE6702CA2A8C2277DFA/..\\..\\cores\\arduino_avr_uno_25f5add4ae28ea76ffd00caafc06d463\\core.a" "-LC:\\Users\\Ahmed\\AppData\\Local\\arduino\\sketches\\441CD5E6AFD18EE6702CA2A8C2277DFA" -lm
"C:\\Users\\Ahmed\\AppData\\Local\\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 "C:\\Users\\Ahmed\\AppData\\Local\\arduino\\sketches\\441CD5E6AFD18EE6702CA2A8C2277DFA/sketch_feb13a.ino.elf" "C:\\Users\\Ahmed\\AppData\\Local\\arduino\\sketches\\441CD5E6AFD18EE6702CA2A8C2277DFA/sketch_feb13a.ino.eep"
"C:\\Users\\Ahmed\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy" -O ihex -R .eeprom "C:\\Users\\Ahmed\\AppData\\Local\\arduino\\sketches\\441CD5E6AFD18EE6702CA2A8C2277DFA/sketch_feb13a.ino.elf" "C:\\Users\\Ahmed\\AppData\\Local\\arduino\\sketches\\441CD5E6AFD18EE6702CA2A8C2277DFA/sketch_feb13a.ino.hex"

"C:\\Users\\Ahmed\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-size" -A "C:\\Users\\Ahmed\\AppData\\Local\\arduino\\sketches\\441CD5E6AFD18EE6702CA2A8C2277DFA/sketch_feb13a.ino.elf"
Sketch uses 1466 bytes (4%) of program storage space. Maximum is 32256 bytes.
Global variables use 196 bytes (9%) of dynamic memory, leaving 1852 bytes for local variables. Maximum is 2048 bytes.
"C:\Users\Ahmed\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude" "-CC:\Users\Ahmed\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf" -v  -patmega328p -carduino "-PCOM6" -b115200 -D "-Uflash:w:C:\Users\Ahmed\AppData\Local\arduino\sketches\441CD5E6AFD18EE6702CA2A8C2277DFA/sketch_feb13a.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\Ahmed\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

         Using Port                    : COM6
         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\Ahmed\AppData\Local\arduino\sketches\441CD5E6AFD18EE6702CA2A8C2277DFA/sketch_feb13a.ino.hex"
avrdude: writing flash (1466 bytes):

Writing | ################################################## | 100% 0.20s

avrdude: 1466 bytes of flash written
avrdude: verifying flash memory against C:\Users\Ahmed\AppData\Local\arduino\sketches\441CD5E6AFD18EE6702CA2A8C2277DFA/sketch_feb13a.ino.hex:
avrdude: load data flash data from input file C:\Users\Ahmed\AppData\Local\arduino\sketches\441CD5E6AFD18EE6702CA2A8C2277DFA/sketch_feb13a.ino.hex:
avrdude: input file C:\Users\Ahmed\AppData\Local\arduino\sketches\441CD5E6AFD18EE6702CA2A8C2277DFA/sketch_feb13a.ino.hex contains 1466 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.20s

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
         0x62 != 0x0c
avrdude: verification error; content mismatch

avrdude done.  Thank you.

Failed uploading: uploading error: exit status 1

Hi, @ahmed_alhajri321

Can you please post your entire code?

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

void setup() {
  Serial.begin(9600);

}

void loop() {
  Serial.print("Hello World");
}

So your code is not uploaded. Except for a damaged 328P processor I have no idea why.

When the "Verify code after upload" preference is enabled, after finishing an upload Arduino IDE reads the memory on the Arduino board and compares the read data against the data of the compiled sketch binary file on your computer that was uploaded to the board. When it did that, it found that the data on the Arduino board did not match what should have been there. As @sterretje said, this means the uploaded program was not written to the memory in the Arduino board during the upload process as expected.

It is possible that a short or external circuitry connected to the Arduino board could cause this type of problem by interfering with the upload process.

Make sure the board is not sitting on anything conductive that could short the contacts on the bottom of the board. Make sure there isn't any conductive debris (e.g., strands of wire or component leads) on the board or on the surface the board is sitting on.

If you have another USB cable on hand, try changing the cable. Maybe a damaged or defective USB cable could be the cause. Make sure the USB cable is fully inserted into the USB socket on the board and computer.

If you have a shield or any external circuitry or components connected to your Arduino board, try this experiment:

  1. Disconnect the USB cable of the Arduino board from your computer.
  2. Disconnect any shields, modules, external circuitry, etc. from your board.
  3. Connect the Arduino board to your computer with a USB cable.

Now try uploading a sketch to the board again. Does the upload succeed?

This experiment will determine whether the upload error was caused by interference from your external circuitry. If so, you can then focus your attention on identifying the specific problem with the circuit and resolving it.

Hello guys sorry to be late for responding but I solve the Problem. I take the arduino to store and told him about the problem. He replace only the Microcontroller with a new one now it is working. Thanks for your times

1 Like

super service

WOW
It would be nice to have that level of service close by.

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