Pages: [1]   Go Down
Author Topic: Is this normal  (Read 579 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 25
Ardno rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Logged

Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
*****
Karma: 11
Posts: 3538
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.  
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 25
Ardno rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Pages: [1]   Go Up
Jump to: