Go Down

Topic: Is this normal (Read 643 times) previous topic - next topic

Jon_Lewis

Hi  all
I was running a sketch on the Arduo  it was powered by external power ,disconnected the USB lead the sketch still ran then disconnected the power the sketch stopped ,reconnected  the power only the power light came on no sketch running then plug in the USB cable the sketch started even though I did not reload it to the board .

Question 1 Should the board reboot after the power is lost


Question 2 Why did the sketch start to run after the USB was reconnected even though I did not reload it.


mellis

Yes, this is due to a mistake in the circuit and software of the board - when it powers up on external power, the serial lines are left floating.  This means that the bootloader (a program that allows you to upload new code onto the board) sees random incoming data and never times out and starts your sketch.  A solution is to try tying the RX pin of the board to +5V with a 10k resistor.  

Jon_Lewis

Thanks mellis  will try this as i may need to run the board under it's own power is this true when configured for USB power.


Looks like another wet week end here in England +more arduinioing

Go Up