Why my LED lambs do not operate

Hi all,

Could someone give me an explanation why the two LEDs on the left of the attached picture, do not light. This is my implementation for project 4 of the ‘Arduino-Starter-Kit-Manual.pdf’.

I have checked whether they are burned but that is not the case!

Could it be the resistors I am using?

I look forward for your positive feedback, Michael3con.

Nothing attached.

For informed help, please read and follow the directions in the "How to use this forum" post.

Maybe your LEDs are backwards. Have you tried turning them around?

I can't clearly see the resistor color codes... And, I don't have the starter kit...

The green LED is on, if all of the resistors are the same it's not a resistor problem.

You can try swapping the LEDs with the green one to test the LEDs. Same thing with the resistors.

Try disconnecting the wires from the I/O pins and connect the LEDs (with series resistor) between +5V and ground. If they work that way, you've got a software bug or your Arduino isn't working.

Is it the color mixing lamp code?

If not, you should post your code (and please use code tags; read the forum sticky, point 7 how to do so).

For a start as you seem to be learning about circuits etc I would re wire that board so the +5V is actually wired to the + rail on the breadboard and the GND to the - rail. It helps no end when you are fault finding especially when you have a dozen or more wires

-- Mark

Post the project code and the project description. I have no clue what project four is in your manual.
If the LEDs aren’t backwards they might be connected to the wrong output pins or other fault in the code.

Maybe the wolf ate the lambs?


// Per.

// Project 4 - Interactive Traffic Lights
int carRed = 12; // assign the car lights
int carYellow = 11;
int carGreen = 10;
int pedRed = 9; // assign the pedestrian lights
int pedGreen = 8;
int button = 2; // button pin
int crossTime = 5000; // time allowed to cross
unsigned long changeTime; // time since button pressed
void setup() {
pinMode(carRed, OUTPUT);
pinMode(carYellow, OUTPUT);
pinMode(carGreen, OUTPUT);
pinMode(pedRed, OUTPUT);
pinMode(pedGreen, OUTPUT);
pinMode(button, INPUT); // button on pin 2
// turn on the green light
digitalWrite(carGreen, HIGH);
digitalWrite(pedRed, HIGH);
void loop() {
int state = digitalRead(button);
/* check if button is pressed and it is
over 5 seconds since last button press */
if (state == HIGH && (millis() - changeTime) > 5000) {
// Call the function to change the lights
void changeLights() {
digitalWrite(carGreen, LOW); // green off
digitalWrite(carYellow, HIGH); // yellow on
delay(2000); // wait 2 seconds
digitalWrite(carYellow, LOW); // yellow off
digitalWrite(carRed, HIGH); // red on
delay(1000); // wait 1 second till its safe
digitalWrite(pedRed, LOW); // ped red off
digitalWrite(pedGreen, HIGH); // ped green on
delay(crossTime); // wait for preset time period
// flash the ped green
for (int x=0; x<10; x++) {
digitalWrite(pedGreen, HIGH);
digitalWrite(pedGreen, LOW);
// turn ped red on
digitalWrite(pedRed, HIGH);
digitalWrite(carYellow, HIGH); // yellow on
digitalWrite(carRed, LOW); // red off
digitalWrite(carGreen, HIGH);
digitalWrite(carYellow, LOW); // yellow off
// record the time since last change of lights
changeTime = millis();
// then return to the main program loop

Hi, Welcome to the forum.

Please read the first post in any forum entitled how to use this forum. http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code. It will be formatted in a scrolling window that makes it easier to read.

You need to write a simple code that turns the LEDs on one at a time?

Do you have a DMM to measure some voltages and test your LEDs?

Thanks.. Tom.. :)

Be methodical - test each LED in the same circuit. Then test each resistor, Then test each Arduino output pin.

Narrow down the problem this way is called troubleshooting and its a vital skill in electronics as there are often many possible causes for a circuit failing to work.

Its a good idea to check all circuit voltages are what you expect with a multimeter, even if a circuit appears to be working - a voltmeter is essential for seeing what's actually happening.

Why my LED lambs do not operate

Because they're baaaaad.

Couldn't resist. Oh - I suppose I could have. I just chose not to.

PaulMurrayCbr: Because they're baaaaad.

Couldn't resist. Oh - I suppose I could have. I just chose not to.

Silence of the lamps.