Results 1 to 7 of 7

Thread: Xlights with Teensy/Octo - LED flicker

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2013
    Posts
    19
    Post Thanks / Like

    Default Xlights with Teensy/Octo - LED flicker

    Currently running Vixen with my Teensy/Octo however I'm interested in trying Xlights. Lots of research and searching has led me to this working sketch;
    https://www.diychristmas.org/vb1/sho...ght=octows2811.
    However, during my testing the LEDs flicker on/off really fast. I get the right colours/effects so I'm fairly confident everything set up right in Xlights.
    Power injection not an issue as only using 5ox5v string.

    I'm not confident in changing the code as I don't understand what it all means.

    Any thoughts?

    Thanks
    Mike

  2. #2
    Join Date
    Dec 2018
    Location
    SF bay area
    Posts
    3
    Post Thanks / Like

    Default Re: Xlights with Teensy/Octo - LED flicker

    I am using similar code
    /*
    ************************ Heinz Doessegger - www.technikfreak.ch ******************************

    Vchristmas v1.0 - January 2015
    Documentation for the project:
    Http://www.technikfreak.ch/category/...tsbeleuchtung/

    HARDWARE: TEENSY 3.1 / 3.2

    ARDUINO PLUGIN: TEENSYDUINO with OctoWS2811 library
    Http://www.pjrc.com/teensy/td_download.html

    LED: WS2811

    SOFTWARE: Vixen Lights 3.x
    Program to control WS2811 RGB LED by Vixen Lights 3.x http://www.vixenlights.com/
    DISPLAY CONFIGURATION - COMx (x = COM port of Arduino) 115200, None, 8 One
    SEND A TEXT HEADER: VIXStart
    Channels: Pro LED requires 3 channels (red / green / blue)
    Color Handling: RGB

    TIP: For beginners
    Start with a 50 series LED. LedsPerStrip and PixelCount to 50.
    In Vixen Lights, create 50 LED elements and map to 150 outputs via the Color Handling RGB.

    ************************ Heinz Doessegger - www.technikfreak.ch ******************************
    */

    #include <OctoWS2811.h>

    const int ledsPerStrip = 1200; // Maximum number of pixels per string
    int PixelCount = 9600; // Effective number of pixels
    float hell = 1.00; // Dimmer 1.00 = 100% brightness - 0.50 = 50% brightness

    DMAMEM int displayMemory[ledsPerStrip*6];
    int drawingMemory[ledsPerStrip*6];
    const int config = WS2811_GRB | WS2811_800kHz;
    OctoWS2811 leds(ledsPerStrip, displayMemory, drawingMemory, config);
    int pixelValue = 0;

    void setup()
    {
    delay(300);
    Serial.begin(115200); // Speed of data transmission from Vixen Lights 3 to the Arduino

    leds.begin();
    for (int i=0;i<PixelCount;i++) // Initialization - Once all LEDs light up blue
    {
    leds.setPixel(i, 200*hell, 0, 0);
    }
    leds.show();
    delay (5000);
    for (int i=0;i<PixelCount;i++)
    {
    leds.setPixel(i, 0, 0, 0);
    }
    leds.show();
    }

    void loop()
    {

    if (Serial.available()>5) // Wait for data transmission from Vixen Lights
    {
    waitForVixenHeader(); // Call function: Waiting for start string

    for (int pixCount=0; pixCount<PixelCount;pixCount++) // Do this for as many Pixels defined in PixelCount
    {
    int RGB[3]; // Array for the three RGB color valuesArray for the three RGB color values
    for (int color = 0;color<3;color++) // Three values each form one RGB LED
    {
    while (Serial.available() < 1) // Wait for the next number
    {
    delay(10);
    }
    RGB[color] = int(Serial.read()*hell); // Assign color value to the array with brightness correction
    } // Repeat until all three values are read

    leds.setPixel(pixCount, RGB[1], RGB[0], RGB[2]);

    } // Repeat until all LEDs are read
    leds.show(); // Activate color patterns
    } // Get the next color pattern
    } // Loop end

    void waitForVixenHeader()
    {
    char *header="VIXStart";
    char buffer[8];
    int index = 0;

    while (true)
    {
    int inByte = Serial.read();
    if(inByte==-1)
    {
    continue;
    }

    buffer[index] = inByte;
    if(buffer[index]!=header[index])
    {
    index=-1;
    }

    buffer[index+1] = 0;
    index++;
    if(index==8)
    {
    return;
    }
    }
    }
    But what I can't figure out is setup of xlights and how to map channels to the different ports on the octo board

  3. #3
    Join Date
    Jan 2019
    Location
    USA - Boca Raton, FL
    Posts
    10
    Post Thanks / Like

    Default Re: Xlights with Teensy/Octo - LED flicker

    Why Teensy? I mean why not to go with Wemos D1 Mini?

  4. #4
    Join Date
    Jan 2019
    Location
    USA - Boca Raton, FL
    Posts
    10
    Post Thanks / Like

    Default Re: Xlights with Teensy/Octo - LED flicker

    This is Wemos D1 Mini flashed with ESPixelStick firmware

  5. #5
    Join Date
    Mar 2017
    Location
    Indiana
    Posts
    111
    Post Thanks / Like

    Default Re: Xlights with Teensy/Octo - LED flicker

    Quote Originally Posted by MikeF View Post
    Currently running Vixen with my Teensy/Octo however I'm interested in trying Xlights. Lots of research and searching has led me to this working sketch;
    https://www.diychristmas.org/vb1/sho...ght=octows2811.
    However, during my testing the LEDs flicker on/off really fast. I get the right colours/effects so I'm fairly confident everything set up right in Xlights.
    Power injection not an issue as only using 5ox5v string.

    I'm not confident in changing the code as I don't understand what it all means.

    Any thoughts?

    Thanks
    Mike
    Can you share a bit more about your setup in Xlights? I've not tried out Xlights yet, but the thread you linked to makes it sound like Xlights doesn't have a direct serial out option. It looked like they were setup to use the DMX protocol, so the script on the Teensy will need to be able to parse a DMX data stream to load the data up for the OctoWS2811 library. Sounds like you're past that and seeing some other issue.
    Christmas 2018 Lights: https://youtu.be/pkcxuiiSdhc
    Halloween 2018 Lights: https://youtu.be/1FM4xhan_G4
    2018 Behind the Scenes: https://youtu.be/jGKUd9HzKGw

    Other shows and behind the scenes:
    https://www.youtube.com/channel/UCg1...c85-wgbnkNiLOw

  6. #6
    Join Date
    Dec 2018
    Location
    SF bay area
    Posts
    3
    Post Thanks / Like

    Default Re: Xlights with Teensy/Octo - LED flicker

    Quote Originally Posted by ShadowLight8 View Post
    Can you share a bit more about your setup in Xlights? I've not tried out Xlights yet, but the thread you linked to makes it sound like Xlights doesn't have a direct serial out option. It looked like they were setup to use the DMX protocol, so the script on the Teensy will need to be able to parse a DMX data stream to load the data up for the OctoWS2811 library. Sounds like you're past that and seeing some other issue.
    I have mine working with one string of 1196 pixels, I haven't built the rest of my show yet but what I can see is the lights are in time with the music which tells me the teensy is keeping up. I uploaded a snpshot of my xlights setup tab
    Attached Images Attached Images

  7. #7
    Join Date
    Nov 2013
    Posts
    19
    Post Thanks / Like

    Default Re: Xlights with Teensy/Octo - LED flicker

    Quote Originally Posted by ShadowLight8 View Post
    Can you share a bit more about your setup in Xlights? I've not tried out Xlights yet, but the thread you linked to makes it sound like Xlights doesn't have a direct serial out option. It looked like they were setup to use the DMX protocol, so the script on the Teensy will need to be able to parse a DMX data stream to load the data up for the OctoWS2811 library. Sounds like you're past that and seeing some other issue.
    My set up using code referenced in my original post;
    Added USB controller, DMX protocol, 150 channels (similar to morry's set up).

    I then used your code, with a minor change (see below), and it stopped the flickering however, the Teensy LED was flashing.
    At that point My coding writing knowledge ended


    if (Serial.read() == '<' && Serial.read() == '>')
    //Header found, set curPixel to 0 to start loading data

    to
    if (Serial.read())
    //Header found, set curPixel to 0 to start loading data
    Last edited by MikeF; 02-10-2019 at 03:21 PM.

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
  •