Page 1 of 5 123 ... LastLast
Results 1 to 10 of 42

Thread: Arduino and vixen 3 WS2811 Pixels Help

  1. #1
    Join Date
    Oct 2017
    Posts
    1
    Post Thanks / Like

    Default Arduino and vixen 3 WS2811 Pixels Help

    Hello Guys,

    Wondering if anyone can help me with an issue that I have ran into.

    First of all, I am a complete newbie to Vixen and Pixels, so do excuse me.

    I have 2 sets of WS2811 Strings, and I would like to use them with Arduino and Vixen 3. I have uploaded some of the FastLED example sketches just to test them, and they work fine and they produce all the colours that they should.

    I then ran a sketch to determine what my Colour Mode was for the set, in my case its RGB.

    I found a sketch that a guy wrote that allows the Arduino to be used as a serial for Vixen using the FastLED library, which works fine.

    So, in Vixen 3, I have done the following.

    I have created a Generic Group with 100 items, as there is 100 Pixels.
    I configured the groups Colour Order to RGB, which then sets 300 Items as I think it used 3 channels for each Pixel.
    I then added the Arduino as a controller within Vixen 3, and configured 300 channels, which I then patched against the Pixels.

    All is good, and in Vixen, if I use the Pixel effects, some of them work and I get Red, Green and Blue.

    Now, if I set a static Colour within Vixen which in my case was White, I just get Red from the pixels. But if I set the static Colour to Red, Green or Blue, I get the colour what I set. I just can't seem to make them go any other colour apart from Red, Green or Blue.

    I hope this makes sense, I am hoping you are going to call me an idiot and tell me I have missed something.

    Many Thanks
    James

  2. #2
    Join Date
    Nov 2016
    Location
    Washington State
    Posts
    147
    Post Thanks / Like

    Default Re: Arduino and vixen 3 WS2811 Pixels Help

    If you you go into your display setup, select you generic group then change the color handling to any color and you may need to tinker with RGB order in the drop down til you get it right. This may be an effect from the sketch you are using.

  3. #3
    Join Date
    Dec 2014
    Location
    Southern California
    Posts
    746
    Post Thanks / Like

    Default Re: Arduino and vixen 3 WS2811 Pixels Help

    Under the elements Color Configuration, did you select "The can be MULTIPLE colors..." or did you select "They can be ANY color..." ?? I think it needs to be ANY color (the bottom choice).
    Kevin

    2017 - Pi3 w/FPP controlling 8 ESPixelsticks driving 1250pixels and 3 Arduino MEGAS communicating with ESP-01s driving 96 channels
    2016 - 184 channels of Blinking/Flashing using 4 Arduino MEGAs and cheap home-made props.

  4. #4
    Join Date
    Nov 2016
    Location
    Washington State
    Posts
    147
    Post Thanks / Like

    Default Re: Arduino and vixen 3 WS2811 Pixels Help

    Good chance if you are getting red from white, you may have a power issue.
    Where are you injecting power and how big is your power supply?

  5. #5
    Join Date
    Feb 2015
    Location
    England, United Kingdom
    Posts
    21
    Post Thanks / Like

    Default Re: Arduino and vixen 3 WS2811 Pixels Help

    Hi James,

    I apologise if I should not be asking on this feed. I am looking at doing something very similar but never used pixels before and bought 1 string of 50 ws2811 addressable rgb lights to start with.
    Is it possible that you could upload the sketch you found as a starting point for me please. From there I can start to understand how it all works.

    Many thanks in advance
    Mark

  6. #6
    Join Date
    Nov 2016
    Location
    Washington State
    Posts
    147
    Post Thanks / Like

    Default Re: Arduino and vixen 3 WS2811 Pixels Help

    Here is a very basic code for arduino that can get ya started.
    Code:
    /*
    
    Vixen Lights 3.x - Arduino Generic Serial for Addressable Pixels
    
    Using this code is pretty straight forward, simply hookup your one wire (WS2811 or WS2812) data line to pin 6 of your Arduino
    and upload this code.  Make sure you have properly installed the FastLED library from http://fastled.io Once you are done, simply
    power your Pixel strips from an external power supply.  Next configure a Generic Serial Controller inside of Vixen Lights 3.x and 
    add 3 x pixels for the number of channels.  Configure the Generic Serial Controller to use 115200, 8, none, and 1.  Then create
    your element and add "Multiple Items (1 x number of pixels).  Finally select your pixel elements and set them as RGB pixels before
    patching them to the controler outputs.  You should now be ready to begin testing.
    
    For a complete tutorial check out blog.huntgang.com
    
    Created   November 8th, 2014
    By        Richard Sloan - www.themindfactory.com
    And       David Hunt - blog.huntgang.com
    Version   1.4
    
    */
    
    
    // You must download and install the library from http://fastled.io/ 
    #include <FastLED.h>
    
    // Sets the maximum number of LEDs that this code will handle to avoid running out of memory
    #define NUM_LEDS 33
    
    // Sets the pin which is used to connect to the LED pixel strip
    #define DATA_PIN 6
    
    CRGB leds[NUM_LEDS];
    
    
    void setup() {
      // Define the speed of the serial port
      Serial.begin(115200);
    }
    
    void loop() {
      // Set some counter / temporary storage variables
      int cnt;
      unsigned int num_leds;
      unsigned int d1, d2, d3;
    
      // Begin an endless loop to receive and process serial data
      for(;;) {
        // Set a counter to 0.  This couter keeps track of the pixel colors received.
        cnt = 0;
        //Begin waiting for the header to be received on the serial bus
        //1st character
        while(!Serial.available());
          if(Serial.read() != '>') {
            continue;
            }
        //second character
        while(!Serial.available());
          if(Serial.read() != '>') {
            continue;
            }
        //get the first digit from the serial bus for the number of pixels to be used
        while(!Serial.available());
          d1 = Serial.read();
        //get the second digit from the serial bus for the number of pixels to be used
        while(!Serial.available());
          d2 = Serial.read();
        //get the third digit from the serial bus for the number of pixels to be used
        while(!Serial.available());
          d3 = Serial.read();
        //get the end of the header
        while(!Serial.available());
          if(Serial.read() != '<') {
            continue;
            }
        while(!Serial.available());
          if(Serial.read() != '<') {
            continue;
            }
        // calculate the number of pixels based on the characters provided in the header digits
        num_leds = (d1-'0')*100+(d2-'0')*10+(d3-'0');
        // ensure the number of pixels does not exceed the number allowed
        if(num_leds > NUM_LEDS) {
          continue;
          }
        // Let the FastLED library know how many pixels we will be addressing
        FastLED.addLeds<WS2812B, 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!
        }
    }
    Last edited by tecnageek; 01-17-2018 at 11:18 PM.

  7. #7
    Join Date
    Feb 2015
    Location
    England, United Kingdom
    Posts
    21
    Post Thanks / Like

    Default Re: Arduino and vixen 3 WS2811 Pixels Help

    Many thanks tecnageek,

    However, I have a problem. For Some reason the Arduino Mega wont accept a sketch. When turned on it runs a sequence of 10 and then 11 whit lights and then 10 stay on slightly flickering. I have tried uploading the Colorpalette sketch from the library which has worked before and it comes up with t e following error message.

    Being new to all of this it doesn't mean much to me :-(
    Any advise or help would be appreciated please!
    Many thanks
    Besty

    "Build options changed, rebuilding all
    In file included from ColorPalette.ino:1:0:
    C:\Users\Mark\Documents\Arduino\libraries\FastLED-3.1.8/FastLED.h:17:21: note: #pragma message: FastLED version 3.001.008
    # pragma message "FastLED version 3.001.008"
    ^
    Multiple libraries were found for "FastLED.h"
    Used: C:\Users\Mark\Documents\Arduino\libraries\FastLED-3.1.8
    Not used: C:\Users\Mark\Documents\Arduino\libraries\FastLED

    Sketch uses 5,906 bytes (2%) of program storage space. Maximum is 253,952 bytes.
    Global variables use 286 bytes (3%) of dynamic memory, leaving 7,906 bytes for local variables. Maximum is 8,192 bytes.

    avrdude: stk500v2_setparm(): failed to set parameter 0x9e
    avrdude: stk500v2_command(): unknown status 0xc8
    avrdude: initialization failed, rc=-1
    Double check connections and try again, or use -F to override
    this check.

    avrdude: stk500v2_command(): unknown status 0x01
    avrdude: stk500v2_disable(): failed to leave programming mode"

  8. #8
    Join Date
    Nov 2016
    Location
    Washington State
    Posts
    147
    Post Thanks / Like

    Default Re: Arduino and vixen 3 WS2811 Pixels Help

    Can you go back and check the port and board selected in Arduino IDE?

  9. #9
    Join Date
    Dec 2017
    Location
    Santa Claus, IN
    Posts
    32
    Post Thanks / Like

    Default Re: Arduino and vixen 3 WS2811 Pixels Help

    Besty, it looks to be an issue with your FastLED library. Open C:\Users\Mark\Documents\Arduino\libraries on your computer and rename the FastLED-3.1.8 folder to FastLED. The contents of the FastLED library should be in the directory C:\Users\Mark\Documents\Arduino\libraries\FastLED

  10. #10
    Join Date
    Dec 2017
    Location
    Santa Claus, IN
    Posts
    32
    Post Thanks / Like

    Default Re: Arduino and vixen 3 WS2811 Pixels Help

    I am having an issue with getting tecnageek's sketch working too. I am testing with 2 - 50 pixel strands and I have Vixen set up properly (Generic Serial, 150 channel outputs, 50 elements set to RGB) but when I create a sequence in Vixen, it doesn't do anything. I have also tested using the FastLED example sketches and the pixels are working as they should be.

Page 1 of 5 123 ... LastLast

Tags for this Thread

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
  •