Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: HELP!! Arduino+Ws2811 Pixel Strings+Vixen

  1. #1
    Join Date
    Oct 2013
    Location
    Hornsea, United Kingdom
    Posts
    74
    Post Thanks / Like

    Default HELP!! Arduino+Ws2811 Pixel Strings+Vixen

    Hi, ive finally ventured into Pixels with my arduino from normal RGB strips and ive purchased two strings of WS2811 Pixels, my problem is when i connect the 5v+ & GND from the arduino to the WS2811's they light up what looks like white constant, and when i connect PIN 6(Arduino) to the string and run vixen nothing happens. i have checked all connections and code. Please can anyone help me and guide me in the right direction.

    Im using this 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 9600, 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 50

    // 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(9600);
    }

    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<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();

    }
    }

  2. #2
    Join Date
    Dec 2011
    Posts
    6,012
    Post Thanks / Like

    Default Re: HELP!! Arduino+Ws2811 Pixel Strings+Vixen

    suggestion !

    This is an excerpt from your post , which is telling you to power your pixels from power source and not arduino directly .

    Once you are done, simply power your Pixel strips from an external power supply .

    Also be sure the pixel gnd and arduino gnd are tied together .
    Be sure you are connecting Pin 6 and power to the DI end of the pixels which is the input end .
    Last edited by angus40; 08-15-2019 at 01:27 PM.

  3. #3
    Join Date
    Oct 2013
    Location
    Hornsea, United Kingdom
    Posts
    74
    Post Thanks / Like

    Default Re: HELP!! Arduino+Ws2811 Pixel Strings+Vixen

    Hi Angus40 thanks for your reply, I have in the past hour connected the WS2811 strip to an external power supply with the GND from arduino connected to GND of supply and no joy, the WS2811 strip still lights up white. I have double checked the DI end of the strip also. i have googled a few posts on the matter and some have mentioned about first pixel maybe damaged and to cut off so i have done that and changed code to 49 pixels but no joy there either. my problem is that the strip is lighting up by just connecting the + & -, the many videos i've watched on the topic the pixels shouldn't light up until i run a sequence in vixen. thanks Angus40

  4. #4
    Join Date
    Dec 2011
    Posts
    6,012
    Post Thanks / Like

    Default Re: HELP!! Arduino+Ws2811 Pixel Strings+Vixen

    Light up all white is usually a sign of no data connection .
    What arduino are you using ?

    I am thinking the issue is you have #defined the data pin but
    not initialized it .

    This may help if you add >>

    Code:
     void setup() {
    // Define the speed of the serial port
       Serial.begin(9600);
    
    // Initial pin states
       pinMode(DATA_PIN, OUTPUT);
       digitalWrite(DATA_PIN, LOW);
    
    }
    Last edited by angus40; 08-15-2019 at 02:43 PM.

  5. #5
    Join Date
    Oct 2013
    Location
    Hornsea, United Kingdom
    Posts
    74
    Post Thanks / Like

    Default Re: HELP!! Arduino+Ws2811 Pixel Strings+Vixen

    HI Angus40, I am using Arduino UNO but i have tried x2 Arduino Mega 2560's and i am getting the same. I have just added the code you suggested and i am still getting the same. i have changed jumper wires and tried another power supply. i have another set of WS2811 pixel strip and tried them and exactly the same problem. Thanks

  6. #6
    Join Date
    Dec 2011
    Posts
    6,012
    Post Thanks / Like

    Default Re: HELP!! Arduino+Ws2811 Pixel Strings+Vixen

    Hmm

  7. #7
    Join Date
    Oct 2013
    Location
    Hornsea, United Kingdom
    Posts
    74
    Post Thanks / Like

    Default Re: HELP!! Arduino+Ws2811 Pixel Strings+Vixen

    Hi Angus40, Ive just uploaded the Fastled colourpallette example and the lights are working great, so i now know my problem is to do with the sketch. I will try and alter the code and try and get it working. Thanks for your input Angus40, will let you know how i get on.

  8. #8
    Join Date
    Dec 2011
    Posts
    6,012
    Post Thanks / Like

    Default Re: HELP!! Arduino+Ws2811 Pixel Strings+Vixen

    Ah ok great you are on a good path !

  9. #9
    Join Date
    Oct 2013
    Location
    Hornsea, United Kingdom
    Posts
    74
    Post Thanks / Like

    Default Re: HELP!! Arduino+Ws2811 Pixel Strings+Vixen

    Hi Angus40, sorted them, it was my bad, it was a "0" missing from my header, I put (>>49<<) and it should have been (>>049<<)

    Thanks for your help..

  10. #10
    Join Date
    Jun 2018
    Posts
    11
    Post Thanks / Like

    Default Re: HELP!! Arduino+Ws2811 Pixel Strings+Vixen

    Good evening, how many sw2811 chains can I drive with arduino to do a vixen controlled light show?

Page 1 of 2 12 LastLast

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
  •