[DIY] Amblight project/guide - Hyperion - WS2801/ WS2812B / APA102 (2 Viewers)

Hapo

Portal Member
August 26, 2015
22
2
29
Home Country
Brazil Brazil
I am not using the Arduino together with the Rpi, im just saying when tested separatedly it had the same problem. The sketch used was the same you passed to me. Is it better for me to use both together? how can i test it with both? I did reboot all times i have chaged RGB settings

Copied the tutorial we had and made some adjustments for testing the led strip:

- First we have to wire everything to the Arduino like this:

fetch.php


- Install Arduino IDE:

http://arduino.cc/en/main/software

- Download FastLed library:

https://github.com/FastLED/FastLED/archive/master.zip

- Extract the master.zip to your Arduino Library folder:

My Documents/Arduino/Libraries

- Afterwards you should have this folder:

My Documents/Arduino/Libraries/FastSPI

- Now load up a sample sketch with the Arduino application, this example is for the WS2801 led type and uses data and clock pin from the above picture:

https://gist.github.com/RickDB/ca59ff69ee857a5f5973

Used 122 leds as I believe that was your total but if not can change that at the top of the sketch, RGB is the default color order but can change that as well if needed (sometimes those are different per chip/brand).

- From the Arduino top menu select Tools - > Boards -> Arduino Uno

- From the Arduino top menu select Tools - > Ports -> COM port of Arduino (typically the second one and never COM1)

- From the Arduino top menu select Sketch -> Upload

- If no errors popup your Arduino will blink shortly and the leds will rotate beween red / green / blue every 500ms.
 

Rick164

MP Donator
  • Premium Supporter
  • January 7, 2006
    1,335
    1,005
    Home Country
    Netherlands Netherlands
    Yeah meant Arduino for testing as that is easiest to debug although you can use it with Hyperion as well but doesn't add anything with WS2801 at least (only more steps)
    So in this this sketch you changed:

    Code:
    #define COLOR_ORDER RGB

    to:

    Code:
    #define COLOR_ORDER BGR

    That should have worked as it changes the command to the leds unless somehow for the led strip the color order is hardware locked but not sure if that is possible.
     
    Last edited:

    Hapo

    Portal Member
    August 26, 2015
    22
    2
    29
    Home Country
    Brazil Brazil
    Yeeh i change those commands on arduino and the colors do change the order (first to light up is the opposite, instead of Blue goes Red), but they still light opposite colors. So the first light to go is RedGreenBlue (mine goes BlueGreenRed) when i change to BGR the first led to light changes to RedGreenBlue (it changes the order but continue with opposite color)


    OBS: Is there a way for making the LED strip understand that RED is BLUE and BLUE is RED?
     
    Last edited:

    Lightning303

    MP Donator
  • Premium Supporter
  • September 12, 2009
    798
    577
    Home Country
    Germany Germany
    OBS: Is there a way for making the LED strip understand that RED is BLUE and BLUE is RED?

    The leds just get 24 bits, 8 bits for each color, and you have to tell your software which color to send first, which second and which last. As Rick said, if you have hyperion set to RGB, and red and blue are wrong, then set it to BGR. After changeing the config file, restart your pi and it works. If it doesnt work, then you are doing something wrong, like chaning the wrong config or maybe forgetting to upload the config. Maybe its read only because hyp is running and you ignored the error msg.
     

    Hapo

    Portal Member
    August 26, 2015
    22
    2
    29
    Home Country
    Brazil Brazil
    The leds just get 24 bits, 8 bits for each color, and you have to tell your software which color to send first, which second and which last. As Rick said, if you have hyperion set to RGB, and red and blue are wrong, then set it to BGR. After changeing the config file, restart your pi and it works. If it doesnt work, then you are doing something wrong, like chaning the wrong config or maybe forgetting to upload the config. Maybe its read only because hyp is running and you ignored the error msg.
    Thats not the error im getting, i can change the color order with no problem. The problem is: the software when i choose RED light up BLUE (even though i choose red) if i change the order to start with BLUE the order change but it light up RED (even though i choose blue).
    The config is uploaded via filezilla and i do restart hyperion settings and the rpi before testing it again. When i restart and check the config file it does show the last modified configuration. There are no error msg

    :(

    Like when i choose Effect: Strobe Blue it strobe red and if i choose Strobe Red it goes Blue

    or if i do on putty

    /storage/hyperion/bin/hyperion-remote.sh --priority 50 --color red --duration 5000

    It light up blue instead of red

    ________________________
    I dont know if it helps, but as i see here all configuration put :

    Red:255, 0, 0
    Green:0, 255, 0
    Blue:0, 0, 255

    And as i changed Strobe Blue (Which was 0.0.255) to 255.0.0 it did strobe blue, is there a way i can modify that on hyperion?
     
    Last edited:

    Hapo

    Portal Member
    August 26, 2015
    22
    2
    29
    Home Country
    Brazil Brazil
    FINALLY, FINALLY i got it working on my TV!!! Next step is going to be the easy capture! Thanks gize for all the help and specially Rick for the guide and assistance

    :):):)

    The problem was: There were 2 places to change hyperion.config file, one at the config folder and another one at the autostart section.

    I didnt had time to do more tests, but i got a video to show the look

     

    Rick164

    MP Donator
  • Premium Supporter
  • January 7, 2006
    1,335
    1,005
    Home Country
    Netherlands Netherlands
    Awesome, have fun :D

    For live capture just make sure you get the right capture stick mentioned in the first post (Fushicai UT007) and the setup should go smoothly, others might recommend the STK1160 but tested 2 different batches of it and they all had frame errors.
     
    Last edited:

    Jeor

    New Member
    October 3, 2015
    2
    1
    Home Country
    Denmark Denmark
    Hi
    Thank you for this awesome guide!

    Sorry, if my question have been brought up before, but I couldn´t find any answers.

    I have used your excellent guide and ran into a problem with two of the leds.

    I have 60 LEDs (WS2812B) and LED number 51 and 52 lights up all the time when the RPi are booted up and Hyperion is running.
    It´s the same color (purple) all the time.

    If I disconnect the USB between Arduino Uno R3 and RPi model B+, they do not turn off. I will have to disconnet the LED supply.
    There is an 470 ohm resistor in serial with the datapin.
    When resetting the Ardunio, the startup swirl are pretty much fine for all the LEDs - my trouble starts when Hyperion starts up.

    I really haven't any clue where to look for this error. I belive it must be in the Arduino code or hardware, but I´m not sure.

    Can somebody please help me?

    Thanks
     

    Rick164

    MP Donator
  • Premium Supporter
  • January 7, 2006
    1,335
    1,005
    Home Country
    Netherlands Netherlands
    Hi Jeor,

    Sounds like it's on the hardware side, can you try the following:

    - Disconnect the leds, connect 1 led strip part which isn't the one with the purple led issue (51-52) to see if you can replicate the issue.
    - Disconnect the leds, connect 1 led strip part which has the purple led issue which should give you the same results.

    This way you can rule out software issues :)
     

    Jeor

    New Member
    October 3, 2015
    2
    1
    Home Country
    Denmark Denmark
    Hi Rick164

    Thank you very much for your suggestions!

    First I tried with another Arduino and some other LEDs, but it was the same scenario.
    Then I looked into the hyperion config file and discovered a wrong code after LED no. 49.
    Decided to make a new config, and now it just works perfect!! :)

    Now the next step for me, would be to connect the video USB grabber and HDMI splitter. I hope I will have better success with that. :whistle:
    Looking forward to enjoy the amblight!

    Thanks for the very good work and this awesome guide - Without this, I would probably never have managed to get to to work.

    Jeor
     

    Users who are viewing this thread

    Top Bottom