1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Finished Ws281x SPI connection device type

Discussion in 'Development' started by penfold42, 11 May 2016.

Tags:
Thread Status:
Not open for further replies.
  1. penfold42

    penfold42 Moderator Developer

    Messages:
    518
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    • Like Like x 2
  2. Wolph

    Wolph New Member Developer

    Messages:
    16
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino, +PhilipsHue, +AtmoOrb, +nodeMCU/ESP8266
    I'm happy to say that the driver has been running very stable on a Pi2 with 518 leds for a couple of days now. No issues whatsoever and more than fast enough :)
     
  3. Alex B. Goode

    Alex B. Goode New Member

    Messages:
    10
    Hardware:
    RPi2, RPi3
    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
    },
     
  4. Wolph

    Wolph New Member Developer

    Messages:
    16
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino, +PhilipsHue, +AtmoOrb, +nodeMCU/ESP8266
    It seems you're using the wrong type actually @Alex B. Goode :)

    The general case for this driver is actually quite simple. Here's my config:
    Code:
    {
        "name": "MyHyperionConfig",
        "type": "ws2812spi",
        "colorOrder": "grb"
    },
    
     
    • Thank you Thank you x 1
  5. Alex B. Goode

    Alex B. Goode New Member

    Messages:
    10
    Hardware:
    RPi2, RPi3
    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!
     
  6. Wolph

    Wolph New Member Developer

    Messages:
    16
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino, +PhilipsHue, +AtmoOrb, +nodeMCU/ESP8266
    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.
     
    • Like Like x 1
  7. penfold42

    penfold42 Moderator Developer

    Messages:
    518
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    The LEDs parameter is redundant for most people.

    It's there for people with more physical LEDs connected than they want to use with Hyperion.

    If you have a 5m strip that you don't want to cut this parameter will set all the remaining LEDs to black
     
    • Like Like x 1
  8. redPanther

    redPanther Moderator Developer

    Messages:
    205
    Hardware:
    RPi1/Zero, RPi2, 32/64bit, +Arduino
    "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-project/hyperion.ng/blob/master/libsrc/hyperion/hyperion.schema.json
    and the leddevice section:
    https://github.com/hyperion-project/hyperion.ng/tree/master/libsrc/leddevice/schemas
     
    • Like Like x 1
  9. Alex B. Goode

    Alex B. Goode New Member

    Messages:
    10
    Hardware:
    RPi2, RPi3
    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!
     
  10. redPanther

    redPanther Moderator Developer

    Messages:
    205
    Hardware:
    RPi1/Zero, RPi2, 32/64bit, +Arduino
    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
     
    • Thank you Thank you x 1
  11. jjansen

    jjansen New Member

    Messages:
    18
    Hardware:
    RPi2, RPi3, +Arduino, +PhilipsHue, +nodeMCU/ESP8266
    Works like a charm. Just changed from Ws2812b+arduino to this setup a week ago. No problems at all. Thanks
     
  12. penfold42

    penfold42 Moderator Developer

    Messages:
    518
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    Thanks for the feedback !
     
Thread Status:
Not open for further replies.