Pages: [1]   Go Down
Author Topic: Did the LED pin 13 should be on in all the codes???  (Read 412 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 17
Iam just biginer
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello, I got my Arduino uno r3 and as usual I started with the blank example and every thing works fine, but when I use the servo code example (sweep) I notice that the pin 13 led work contenus (not blanking).

so is it usual that this led works with every code even if there is no setup for it????     
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 111
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The LED only blinks if you tell it to turn on, then turn off.

I don't think there is anything telling the LED to blink in that code, so it should not be blinking.

If you set the LED (pin 13) to "HIGH" it will stay on and not blink, otherwise it shouldn't blink
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 485
Posts: 18778
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I think the bootloader might leave pin 13 turned on. You can always turn it off in your code.
Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 17
Iam just biginer
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I think the bootloader might leave pin 13 turned on. You can always turn it off in your code.

Oh, I think thats make sense because I didn't put a code thats make the led high.

I'm I right???
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 485
Posts: 18778
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

That's what I am saying.
Logged


Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 538
Posts: 27089
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

If pin 13 is left as an input, the pin could float and trip the comparator, so the LED could turn on.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Pages: [1]   Go Up
Jump to: