Ws281x SPI connection device type

  • I would also like to confirm that my RPi 2 with Raspbian Jessie + Hyperion v1.03.2 works very well for 146 leds of ws2812b.
    No special additional modules of libraries were loaded, but I used a level shifter 74HCT08N to be sure.


    Meanwhile I wonder why sample config recommends to specify "leds" parameter under "device" section of the config?
    It looks redundant because its value is automatically countable from "leds" section of the config.


    In my case this section looks like the following:


    // DEVICE CONFIGURATION
    "device" :
    {
    "name" : "MyHyperionConfig",
    "type" : "ws281x",
    "colorOrder" : "grb",
    "leds" : 146,
    "gpio" : 18,
    "dmanum" : 5,
    "freq" : 800000,
    "pwmchannel" : 0
    },

  • I have to admit that the simplified version of the config works for me as well...
    However in this case I propose to reflect that fact in the wiki, which still states the following:


    The device-config for the NEW led device that support RPi 1,2,3 should look like this:
    Code:
    "device" :
    {
    "name" : "MyPi",
    "type" : "ws281x",
    "colorOrder" : "grb",
    "leds" : 107
    },

    Additional device parameters

    In addition to "colorOrder" and "leds", the "ws281x" device has the following parameters (listed here with their defaults):
    Code:
    "gpio" : 18,
    "dmanum" : 5,
    "freq" : 800000,
    "pwmchannel" : 0,


    The wiki instructions seem to be overkill and may confuse audience like me
    :)


    And I still wonder how hyperiond service is discovering which GPIO pin is actually used if i do not specify it explicitly!

  • I agree, the wiki should be improved a bit.


    As for knowing the pin, instead of using GPIO (directly controlling the pin) this method uses the SPI pins on the pi. Which means that you are using either /dev/spidev0.0 or /dev/spidev0.1 which are connected to pins 19 and 21 for /dev/spidev0.0 and to pins 24 and 26 for /dev/spidev0.1


    By default the /dev/spidev0.0 device is used which uses pin 19 and 21.

  • "leds" paramter is not correct. It is "ledCount" and is a general parameter that defines amount of physical leds. As penfold already said, this is only needed when you have more leds than configured in leds section.


    If you have more leds than configured, then this option ensures that additional not used leds stay off and don't flash randomly due to electrical noise


    If you want to know which options are valid look in schema files:
    https://github.com/hyperion-pr…rion/hyperion.schema.json
    and the leddevice section:
    https://github.com/hyperion-pr…/libsrc/leddevice/schemas

  • I don't need this parameter at all.
    I just wanted to point the attention of the audience that the meaning of this parameter wasn't obvious and looked confusing


    And the incorrect naming "leds" is actualy mentioned at the wiki page, so if it is not correct then it's better to update the wiki to make the world a little bit more consistent
    https://hyperion-project.org/wiki/3-Wire-PWM


    And looking at the schema ../hyperion.schema.json
    I would say that the description "Count of all hardware LEDs" doesn't explain the core meaning of this parameter - to limit the number of managed LEDs if you need to


    I am personally happy with a very simple version of this config section where I have only name, type and colorOrder!

  • LedCount is more or less a 'nerd' option.
    I only want to clearify that, so nobody tries 'leds' and than it doesn't work ....
    We will update wiki when we realease hyperion.ng. Before it is sensless, because config could change to often. Thatswhy my hint to the schema files, so anybody get a clue whats possible.


    When finished we will have a good doc ...


    And yes it is good to write only things you need on your config. Missing params get default values

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!