UNO R3 delay problem

Help me please
I am using arduino uno r3,
In blink programme I set delay 7200000, (2 hr),(then I don’t know about max delay) , now my problem is "my arduino board is not respond when I press reset button and I can't upload any programme."
"avrdude: stk500_getsync(): not in sync: resp=0x00" error message shows when I upload any program!

(I try those methods, but not work

  1. Press reset button
  2. Manually short ground and reset pin
  3. Plag and unplag arduino board
  4. Update arduino driver
  5. Short rx and tx pin with ground
    )

@amit-das

I think more actual detail is needed from you.
Please use the links below.

TOPIC SPLIT
PLEASE DO NOT HIJACK / NECRO POST !

Could you take a few moments to Learn How To Use The Forum.
Other general help and troubleshooting advice can be found here.
It will help you get the best out of the forum in the future.

the number being passed to delay function is interpreted as int. This would mean the delay is limited to a max of 32,767

smarts-jb:
Says here:

So 4,294,967,295.

please feel free to check this

m_k_akash:
please feel free to check this

And of course if you specify an unsigned long as in 7200000UL then it definitely won’t assume it’s an int.

Steve

That stack overflow thread is full of misinformation, dear god... nobody has a damned clue what they are talking about in it...

That said, I seem to remember this being a problem in the past, too, though I can't reproduce it now either.

m_k_akash:
please feel free to check this

You have the source.
Why not look at that, instead of guessing?

You can do:

delay(7200000);  // 10 minutes

and it should work fine.
What you CAN'T do is something like:

delay(10*60*1000);  // 10 minutes

because the expression will be evaluated with "int" types, but the compiler is smart enough to know that "7200000" is a long...

m_k_akash:
the number being passed to delay function is interpreted as int. This would mean the delay is limited to a max of 32,767

Sir now I know that, but my problem is "my arduino board is not respond when I press reset button and I can't upload any programme."
"avrdude: stk500_getsync(): not in sync: resp=0x00" error message shows when I upload any program!

smarts-jb:
And you feel free to actually test delay() with a number bigger than 32k ms, like I just did

Sorry sir my full post wasn’t published, my problem is "my arduino board is not respond when I press reset button and I can't upload any programme."
"avrdude: stk500_getsync(): not in sync: resp=0x00" error message shows when I upload any program!

smarts-jb:
And you feel free to actually test delay() with a number bigger than 32k ms, like I just did.

smarts-jb:
And you feel free to actually test delay() with a number bigger than 32k ms, like I just did.

Re-post (Because my full post wasn’t published )

Help me please
I am using arduino uno r3,
In blink programme I set delay 7200000, (2 hr),(then I don't know about max delay) , now my problem is "my arduino board is not respond when I press reset button and I can't upload any programme."
"avrdude: stk500_getsync(): not in sync: resp=0x00" error message shows when I upload any program!

(I try those methods, but not work

  1. Press reset button
  2. Manually short ground and reset pin
  3. Plag and unplag arduino board
  4. Update arduino driver
  5. Short rx and tx pin with ground
    )

You can use millis() instead of delay(). Why stick to delay() all the time? millis() run upto 50 days before getting reset. Upload a simple blink sketch to see if your arduino is working properly first.

File -> Examples -> Basics -> Blink -> Upload the program

While millis() timekeeping is far superior to delay(), according to his post, he cannot upload sketches because he is receiving the usual sync error. Nothing he changes in his sketch can fix this, nor is anything his code did related to this issue.

amit-das:
Re-post (Because my full post wasn’t published )

Help me please
I am using arduino uno r3,
In blink programme I set delay 7200000, (2 hr),(then I don't know about max delay) , now my problem is "my arduino board is not respond when I press reset button and I can't upload any programme."
"avrdude: stk500_getsync(): not in sync: resp=0x00" error message shows when I upload any program!

(I try those methods, but not work

  1. Press reset button
  2. Manually short ground and reset pin
  3. Plag and unplag arduino board
  4. Update arduino driver
  5. Short rx and tx pin with ground
    )

That issue is unrelated to what you did with delay.

With nothing connected to the board other than the USB cable, press and release the reset button. Does the L led blink?

If the LED does not give the "triple blink" when you press reset, that suggests that the board is damaged, particularly if the LED is "stuck on". Also, make sure you have the correct serial port selected - when you unplug the Arduino, the serial port should disappear from the tools -> port menu. If no port appears when the board is connected and disappears when it is disconnected, either drivers are not installed, or the board has suffered hardware damage and should be discarded and replaced.

Frequently, in event of electrical abuse, the LED will be stuck on, and - if it's an official board - the serial adapter will also get trashed (port will not show up at all). The clones use a more durable serial adapter, so they often end up with the LED stuck on (this is due to a blown opamp used to bufer it and do power supply switching), but the serial port still showing up. Sometimes these boards still work while powered from USB (SPI won't work, though - SCK is usually near shorted to ground by the blown opamp). They won't work from external power supply because the opamp used for power supply switching is hosed.

DrAzzy:
While millis() timekeeping is far superior to delay(), according to his post, he cannot upload sketches because he is receiving the usual sync error. Nothing he changes in his sketch can fix this, nor is anything his code did related to this issue.

Oh ok

By the way delay() takes unsigned long. So you can enter any positive value between 0 and 2,147,483,647. So yeah you have not exceeded the max delay.

TheUNOGuy:
By the way delay() takes unsigned long. So you can enter any positive value between 0 and 2,147,483,647.

…and then some