if condition and Analog pin to eliminate boot load time

gfvalvo:
That's ridiculous. Why is the processor powered off between stops? I think there's a fundamental flaw in the design of the code you haven't shown us.

where do you see processor being turned off?
could you refer to the specific code that does that and make suggestion on how to fix it?
thanks

saeidans:
where do you see processor being turned off?

Your very first post of this thread suggests it:

saeidans:
it takes about 6 Seconds for the Ardunio to boot up when the power is connected to run the code that creates visual effect on the LEDs.

Powering off and on again is the typical reason for a processor to reboot. Could be a messed-up power supply as suggested in Reply #19.

where do you see processor being turned off?

Maybe that's not the problem... YOU said it was a boot problem...

The Arduino ONLY boots during power-up or hardware reset. There is no way to reset/reboot in software.

TOPIC LOCKED until I can figure out why MERGE is not playing nice.

@saeidans

Please do NOT cross post / duplicate as it wastes peoples time and efforts to have more than one post for a single topic.

Continued cross posting could result in a time out from the forum.

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

EDIT Danged forum software issue so unlocked.

saeidans:
Hello
I am using an Arduino nano to control smart LED to be used for tailgate stop light in my car.
the issue is there is about 6~7 seconds delay when I hit the break on the car where the LEDs should turn on instantly.

my question is how to eliminate the booting delay time?

This is because the OP is trying to make the brake lights operate by powering the Nano up each time the brake is applied.
The OP did I think ask if you could use an input pin to operate the lights and so keep the Nano turned ON all the time the ignition is ON.
If that is the question, then yes you can do it that way, and it will be almost instantaneous.
Can you please post your code and we can advise how to edit your code to do it.
Tom.... :slight_smile:

TomGeorge:
The OP did I think ask if you could use an input pin to operate the lights and so keep the Nano turned ON all the time the ignition is ON.

And, OP received an answer in Reply #2.

gfvalvo:
And, OP received an answer in Reply #2.

I know back on page 1, but OP hasn't acknowledged the answer, hence we are on page 2 , post 26. :o

Tom..... :slight_smile:

6 seconds from poweron to sketch execution sounds about right for the original Arduino Bootloader without Adafruit's "fast boot" fix. Many of the cheap nano vendors are still using that version.
Replace the bootloader and you should be happier (but if you can do that, you can do ISP programming and get rid of the bootloader entirely.)

Replace the bootloader and you should be happier

If I understand the OPs use case (brake light control) then I would not be happy with any delay that could be detected by a human.

There seems to be no reason not to keep the Arduino powered. At least we have not heard one as far as I know

(yes, continuous power is probably a good idea, if it's available. I was just trying to explain the six-second delay that most people thought shouldn't be there.)

Power-on time for an Arduino with Optiboot should be less than 100ms.