Help??

Alright, I want to control four LEDs individually through my Arduino. I assume I'll have to use the breadboard, but I simply cannot find a tutorial on blinking multiple LEDs, let alone controlling it.

The code, I feel, will be fairly simple. I am lost on the circuitry and schematic and wiring and all that.

Link or help please? 0:-)

Output pin -> resistor 220R -> anode of LED -> cathode of LED -> ground.

Do it 4 times with different pins.

Thank you for your reply and link! :slight_smile:

But how do I connect the wires on the breadboard? I don't have that many ground pins... inputs.

But how do I connect the wires on the breadboard?

I am a bit puzzled about what you don't understand. You get wire, strip a bit of insulation off the end and push it in the hole. Do the same for the other end and make a connection.

I'm sorry, I'm really new to Arduino and I don't understand a lot (obviously).

I mean that I only have a limited number of places to connect a ground wire to. I don't really understand how to connect three to four LEDs to a ground wire...

I'm sorry... :frowning:

Wire all the pins together on the bread board and then take one wire from the bread board and connect it to the ground on the arduino. All are at the same potential.

Alright, thank you.

It doesn't matter where on the Bread Board?

No as long as they are connected together and not connected to any other signal the it physically doesn't matter where they are. It is only important where the electricity can flow.

Alright, thank you very much! I've managed to blink two LEDs... Working on the 3rd.

I really appreciate it!

The LEDs on the Bread Board are really dim.... What does that mean I'm doing wrong?

Either too much resistance or you haven't set the pins as outputs using the pinMode() function in the setup()

You just have to do pinMode(LED, OUTPUT), right?
Because I did that :frowning:

An LED plugged directly into the board is very bright. The first LED plugged into the BreadBoard is half lit. The second into the breadboard is so low that I have to cup my hands to see if it's lit. I'm assuming this is a resistance problem then. So, get smaller resistors?

You need a resistor in line with each LED. What value are you using?
You need to connect each LED to a different output pin and program up each one separately.

lwa223:
You just have to do pinMode(LED, OUTPUT), right?
Because I did that :frowning:

An LED plugged directly into the board is very bright. The first LED plugged into the BreadBoard is half lit. The second into the breadboard is so low that I have to cup my hands to see if it's lit. I'm assuming this is a resistance problem then. So, get smaller resistors?

Well it's pinMode(PinNumber, OUTPUT); so you have to have declared the pin number correctly for the output pins you are wiring to. Post your code if you want us to see if you did everything correctly. What size resistors are you using, just anyone you grab doesn't work well? 220 to 1,000 should be fine to make it work without burning up an output pin. Higher then that and they can work but will be dimmer.

Lefty

#define LED1 13
#define LED2 12
#define LED3 11
#define LED4 10

void setup()
{
pinMode(LED1, OUTPUT);
pinMode(LED2, OUTPUT);

}

void loop()
{
digitalWrite(LED1, HIGH);
digitalWrite(LED2, HIGH);
}


(That's just to get them to light up, I know that that code won't blink them ;))

When you post code select it and hit the # icon third from the right over the reply box.

You need to define all the LEDs you use:-

#define LED1 13
#define LED2 12
#define LED3 11
#define LED4 10

void setup()
{
  pinMode(LED1, OUTPUT);
  pinMode(LED2, OUTPUT);
 pinMode(LED3, OUTPUT);
  pinMode(LED4, OUTPUT);

}

void loop()
{
  digitalWrite(LED1, HIGH);
 digitalWrite(LED2, HIGH);
  digitalWrite(LED3, HIGH);
 digitalWrite(LED4, HIGH);
delay(400);
 digitalWrite(LED1, LOW);
 digitalWrite(LED2, LOW);
  digitalWrite(LED3, LOW);
 digitalWrite(LED4, LOW);
delay(200);

}

will flash them.

What resistor value are you using. Maybe it is time to post a photo of your wiring.

I believe it's a 10 Kohm

lwa223:
I believe it's a 10 Kohm

That's over ten times too large. Again 200-1,000 ohms will let you see the light. One needed for each led.

Lefty

Sorry, I was just using the smallest resistor I had in an Arduino pack I had.
I found a 1 ohm and a 1 kohm... so I hope the latter will work.