sonyhome / FAB_LED

Fast Arduino Bitbang LED library supports programmable LEDs (WS2812B, APA102...), color palettes for Arduino AVR
GNU General Public License v2.0
125 stars 17 forks source link

Question : Control individual LEDs #19

Closed xkidro closed 7 years ago

xkidro commented 7 years ago

Hello!

Is it possible to control many individual LEDs?

I don't want to make strips or led matrixes, I just want to place leds in certain places and I want to be able to control each one individually, some leds might display status from certain sensors, others might display twitter notifications maybe ?

Is this possible with this library.

(Disclaimer, just bought a batch of SK6812 and an ESP-14, never issued a microcontroller before and I don't own an Arduino, I do have an Raspberry Pi Zero W which I plan to control all my micro devices using ESPs, I am comfortable with programing PHP/JavaScript and others)

Thanks!

sonyhome commented 7 years ago

You have the choice:

1 Have one LED per port, but that will limit you 2 Have all LEDs on one port, chained together

I recommend (2) as it allows you to have as many LEDs as you want and use up very little resources.

You can program each one individually, and when you update the status of a LED you just send the data for all the LEDs out at the same time. Those that don't change will stay unmodified if you didn't change their color.

This allows also each LED to have a color of your choice for detailed status. For example change the status from green to orange to red.

With Pi Zero, it might be best to look into APA-102 LEDs or 2801, they use the SPI protocol which is not timing sensitive.

Today programmable LEDs are easier to use than regular LEDs which require adding an 80 ohm resistor and need to be controlled by software for anything more than on/off (like dimming).

Note: you realize your logo is a Docker company logo? :)