Results 1 to 4 of 4

Thread: Arduino + Pixel + Vixen issue

  1. #1
    Join Date
    Nov 2019
    Posts
    2
    Post Thanks / Like

    Default Arduino + Pixel + Vixen issue

    I have got 2 strands of 50 pixel WS2811, firstly I found I was getting green when I had red in Vixen, but I found that issue and if you haven't found it here it is:

    Code:
        // Let the FastLED library know how many pixels we will be addressing
        FastLED.addLeds<WS2811, DATA_PIN, GRB>(leds, num_leds);
        // Loop through each of the pixels and read the values for each color
        do {
          while(!Serial.available());
            leds[cnt].r = Serial.read();
          while(!Serial.available());
            leds[cnt].g = Serial.read();
          while(!Serial.available());
            leds[cnt++].b = Serial.read();
          } 
        while(--num_leds);
        // Tell the FastLED Library it is time to update the strip of pixels
        FastLED.show();
        // WOO HOO... We are all done and are ready to start over again!
        }
    }
    FastLED.addLeds<WS2811, DATA_PIN, GRB>(leds, num_leds); need to be FastLED.addLeds<WS2811, DATA_PIN, RGB>(leds, num_leds); to avoid reversing Red and Green

    The issue I can't figure out is how to get intensity to work, does anyone know this? I have noticed that the code is missing FastLed.SetBrightness(xxx); to be able to accomplish this but this means that some effects in Vixen don't work as intended. Anyone have code to take care of that?

  2. #2
    Join Date
    Dec 2012
    Location
    Newtown CT
    Posts
    4,070
    Post Thanks / Like

    Default Re: Arduino + Pixel + Vixen issue

    The lines like this: "leds[cnt].r = Serial.read();" set the intensity for each color in the tri-color LED


    2020 Full sized show reworked for the new location. Only adding (famous last words) 13 RBLs that I finally got converted to using pixels
    2019 - Just moved into a new home (yet another change of plans). Will be dim but not dark. Too much to do at the new place to leave time for a show. Dim show (3000 pixels) had regular visits most nights.
    https://www.youtube.com/channel/UCyX...ttrsZNARkUce0Q

  3. #3
    Join Date
    Nov 2019
    Posts
    2
    Post Thanks / Like

    Default Re: Arduino + Pixel + Vixen issue

    I believe that actually sets the red value.

    To break the line down, Leds is an array of 1 to 50 with values for R G and B. Be interested to see what Vixen actually sends down the USB pipe.

  4. #4
    Join Date
    Oct 2014
    Location
    Sauk City, WI USA
    Posts
    1,205
    Post Thanks / Like

    Default Re: Arduino + Pixel + Vixen issue

    Vixen sends the value for r g and b. The "brightness" of red is whatever the value of r is. So 50% brightness is 128.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •