Led on pin 13 is continously blinking

I am making a line follower using Arduino Uno R3.I had uploaded the program once,but the car wasn't working well.So i made some changes to the code and re-uploaded it.It got uploaded without errors.But when i connected the battery i got nothing but just the blinking of led on pin 13.(It blinks rapidly then stops this continues indefinitely)

I have tried restarting the computer but it didn't help.I have also reinstalled the drivers but same,it didn't help.

I have uploaded other programs like BLINK and they do work! :o

What is wrong with the board?? :frowning:

1 Like

If blink and other sketches work, it's not the board.

So i made some changes to the code

So the changes you made had bugs and the code has crashed. You need to figure out what/where the bugs are and fix them.

Pete

The problem is that we know nothing about your circuit, your assembly, or your code.

So you have a code problem. Your move.

One more thing ,

I am powering the arduino by using the Vin pin using a 9v battery.The same battery powers l298n board.
If I power the arduino from usb and let the 9v battery power the l298n then the arduino works fine.

So is there problem with the Vin pin?

No, there is a problem with the battery.
9volt batteries are for smoke alarms, not for motors or Arduinos.
Leo..

You are using a battery that in not capable of supplying the current required. Use a plug pack that is rated for the voltage and current needed.

Weedpharma

Yep that helped.Thanks to all.