Pages: [1]   Go Down
Author Topic: arduino resets itself  (Read 227 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

My arduino uno is having a problem running a certain sketch.  when it gets halfway through, the pin 13 led flashes briefly, and the
sketch restarts itself. I have 2 servos and one ultrasonic sensor attached to the 5v+ pin, the servos to digital 2 and 3, and the ultrasonic to 7.
Logged

Grand Blanc, MI, USA
Online Online
Faraday Member
**
Karma: 95
Posts: 4089
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The crystal ball is out at the cleaners, so it might help to post that "certain sketch". Is the power supply sufficient for the servos?
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 308
Posts: 26472
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
i am using a nine volt battery
OK, get back to us when you've fixed that.
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Scotland
Offline Offline
Edison Member
*
Karma: 26
Posts: 1338
Have you had your Arduino fix today?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Please read the sticky at the top of this forum & also choose a more appropriate section, this is not an installation issue.
Logged

Drew.
http://www.uk-pcb.co.uk - My UK Based PCB Fab & Assembly Company
Design work undertaken
SMD & Thru-Hole assembly

Grand Blanc, MI, USA
Online Online
Faraday Member
**
Karma: 95
Posts: 4089
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

What @AWOL is saying is that a 9V battery is undoubtedly inadequate to power a servo (let alone two).  Likely that the voltage is dropping and causing a reset via the brownout detector.
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Pages: [1]   Go Up
Jump to: