Arduino NANO PIN 13 Blink problem while initializing the bootloader!

I have build two Line follower robots with arduino NANO and both of them have the same circuitary and code. The first one i build works fine as the PIN 13 of that NANO doesn't blink when i turn on power. I have a motor connected via L293D on that pin 13. But on the second car when i turn on power, the pin 13 blinks for some miliseconds and causes the connected motor spin for a while which is really annoying.

Can anyone explain me why this is happening? I bought all the components including the NANOs from the same shop. Why two NANO's behave unsimilar? Is it a bootloader issue? Please explain me.

I have build two Line follower robots with arduino NANO and both of them have the same circuitary and code. The first one i build works fine as the PIN 13 of that NANO doesn't blink when i turn on power. I have a motor connected via L293D on that pin 13. But on the second car when i turn on power, the pin 13 blinks for some miliseconds and causes the connected motor spin for a while which is really annoying.

Can anyone explain me why this is happening? I bought all the components including the NANOs from the same shop. Why two NANO's behave unsimilar? Is it a bootloader issue? Please explain me.

The blinking is caused by the bootloader. Why one blinks and the other one doesn't is difficult to say. Different bootloaders is a possibility or no bootliader at all in one of them.

Did you program the one that does not blink using ICSP?

The bootloader is blinking pin 13. Some bootloaders jump to your sketch immediately on a power-on reset (but not on an external reset which initiates an upload) so there is no blinking in this case.

Threads merged.

sterretje:
The blinking is caused by the bootloader. Why one blinks and the other one doesn't is difficult to say. Different bootloaders is a possibility or no bootliader at all in one of them.

Did you program the one that does not blink using ICSP?

I am not uploading program using ICSP. I am uploading through the usb port on NANO. But any way to stop this upload time blink?

I think that below are the options:
1)
Easiest solution, rewrite the code not to use pin 13. But I'm not sure of that is an option for you.
2)
Upload using ICSP which will wipe the bootloader.
3)
Cut the DTR track on the board; pin 2 of the FT232. In that case you can only upload by pressing / releasing the reset button (at the right time) or by fixing the track.

I replaced the bootloader with optiboot bootloader and that done my job perfectly :slight_smile: