Arduino Blinking LED Questions

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Kravortek
 
Posts: 2
Joined: Wed May 16, 2018 7:37 pm

Arduino Blinking LED Questions

Post by Kravortek »

I'm diving in to the world of Arduino for the first time, using the Experimenter's kit , along with a full size breadboard and some 10mm warm white LEDs.

I'm using Digital Pins 2 through 10. But while I've managed to get the LEDs blinking in the order I want to (based on the Blink example sketch), I've run into a couple of problems.

1) When I run "digitalWrite(2, HIGH)", the LED doesn't appear very bright. So I changed it to "analogWrite(2, 255)", which produces a much brighter LED.

What's going on here?

2) I have nine LEDs blinking in a pre-programmed pattern. How do I wire additional LEDs in parallel to create groups without decreasing the brightness of the LEDs?

For example, Pin 2, which is always on, will have 17 LEDs in that group, while Pin 4 will drive 7 LEDs.

I tried running a jumper wire from Pin 10, going to the positive lead of two LEDs, with each LED having 560 Ohm resistor on the negative lead, which runs to GND on the Arduino, but that didn't work, but when I plugged a second LED into the breadboard in front of the first LED, it blinked at the same time, but the brightness of both LEDs decreased.

https://imgur.com/a/BPFUxIr

Any suggestions would be greatly appreciated.

-Tom

User avatar
adafruit_support_bill
 
Posts: 88088
Joined: Sat Feb 07, 2009 10:11 am

Re: Arduino Blinking LED Questions

Post by adafruit_support_bill »

Not sure about your first question. DigitalWrite HIGH should be equivalent to analogWrite 255. This is especially true for pin 2 which does not support PWM.

To drive many LEDs from a single pin, you will need something like a transistor to switch the additional current. The Arduino pin alone can't handle more than about 20mA. Your circuit is similar to an analog LED strip. See this guide for an example of driving with transistors: https://learn.adafruit.com/rgb-led-strips/usage

User avatar
Kravortek
 
Posts: 2
Joined: Wed May 16, 2018 7:37 pm

Re: Arduino Blinking LED Questions

Post by Kravortek »

Thanks!

I'll check it out!!

-Tom

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”