Go Down

Topic: secondary LED on Arduino Uno board will not light up properly. (Read 746 times) previous topic - next topic

MrMcButterscotch

were here with our Arduino Uno and every time we put in a secondary LED (port 8; but we've tried others)  it glows much dimmer than it could. the main LED (Port 13; also have tried others) is fine and if we switch the two around (Main becomes secondary) the secondary still does not light up as much as it could. the code is correct and the LEDs are fine (we've tested with a battery), we just cannot get the secondary to completely light up.

Thanks
Dylan
7th grade
Saint Louis

CrossRoads

Post your code, let's see.
You are using a current limit resistor with 2nd LED?
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

LeiruSuellihca

All we had to do was type pinMode("led name", OUTPUT);

That should set up the ground port for the LED.

Uriel A.
8th Grade
St. Louis
Grand Center Arts Academy (GCAA)

John_Smith

"All we had to do was type pinMode("led name", OUTPUT);
That should set up the ground port for the LED."

before setup declare the new LED and pin connection :-

int  ledname  = 8;

And then in Setup

pinMode("ledname", OUTPUT);

and in loop


digitalWrite (  ledname ,   HIGH);

and the LED  connected to pin 8  ( via a resistor ! )   should light...
45 years of editing projects with a knife and soldering iron, then I found Arduino !

Go Up