meduzapat / LEDSpicer

LEDSpicer a LED Animator and Controller for Linux
GNU General Public License v3.0
32 stars 13 forks source link

Allow elements to be created as strips #72

Closed meduzapat closed 1 month ago

meduzapat commented 1 month ago

Strips elements

With the addition of serial hardware, now led strips are very common, and the strips are very log with lots of elements. Allow elements to automatically generate all the elements for the strip when the the strip type is detected:

Example

strip with 50 RGB LEDs

<element
    name="STRIP1"
    stripSize="50"
    position="91"
    colorFormat="rgb"
/>

This pseudo element will create elements called STRIP10 to STRIP150 and a group called STRIP1

parameters for strip

  1. colorFormat LEDs color format, can be any combination of RGB, BRG,etc.
  2. position starting position
  3. stripSize the number of RGB LEDs in the strip. So, if your strip is connected to the connector 91 92 93 and is 40 elements, using GBR the value will be:
    <element
    name="STRIP1"
    stripSize="40"
    position="91"
    colorFormat="gbr"
    />

RGB elements

When working with serial adapters, RGB LEDs are always grouped by 3 consecutive LEDs, the way that the program works right now is aim to parallel adapters where the LEDs may not be grouped in 3 consecutive LEDs. Using the same logic than Strips we can create a single element just by defining that is a RGB element.

Example

<element
    name="My_Element"
    position="91"
    colorFormat="rgb"
/>

Where position will be the first LEDs based on the color format, so in the RGB case, the pin 91 is RED.

parameters for RGB element

  1. colorFormat LEDs color format, can be any combination of RGB, BRG,etc.
  2. position starting position
meduzapat commented 1 month ago

enhanced