Running more than 1 LED per pin

Status
Not open for further replies.

YeloLem

Member
Hi,

Amateur question, how might I get around 4-5 component leds to run on one pin? My current setup has a few leds in parallel, but as expected they are dimmer now. I want to light around 16 leds in total but I am using an audio shield and controlling(fading) the leds with a potentiometer for my project so I am limited to the number of pins I can use.

Thanks.
 
With only 1 digital pin, usually using WS2812 / NeoPixel LEDs is the way. The communication these LEDs use can really disrupt other libraries, but if you use less than 40 of them the audio lib is usually fine. Only 4 or 5 should be no problem.

With 2 pins, you can use APA102 LEDs.

With 3 pins, you can use the 74HCT595 shift register chips and normal LEDs. The ShiftPWM library is usually the easiest way.
 
Another possibility is using i2c devices (MCP23008 and MCP23017 if memory serves are two examples). You only need the 2 standard i2c pins, and you can have other i2c devices on the same chain. Note, you will need pull-up resistors on the Teensy between each of the two i2c pins and 3.3v to enable i2c.
 
Status
Not open for further replies.
Back
Top