1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

RPi + OpenELEC Lights are very laggy and not smooth

Discussion in 'Hardware Support' started by anna mae, 13 April 2020.

  1. anna mae

    anna mae New Member

    Messages:
    4
    Hardware:
    RPi1/Zero, +Arduino, +PhilipsHue
    I've finally finished installing hyperion for the second time. The first time worked well but this time the lights are very laggy and the lights changes aren't smooth like they used to be.

    I've tried changing the baud rate to 1,000,000 and that didn't help. I changed the baud rate back to 460,800. Any advice would be appreciated.

    I'm using a Rpi zero, arduino uno, fushicai usbtv007 grabber

    here's a video sample.


    Json code

    Code:
    // Automatically generated configuration file for Hyperion ambilight daemon
    // Notice: All values are explained with comments at our wiki: wiki.hyperion-project.org (config area)
    // Generated by: HyperCon (The Hyperion deamon configuration file builder)
    // Created with HyperCon V1.03.3 (22.10.2017)
    
    {
        // DEVICE CONFIGURATION
        "device" :
        {
            "name"       : "MyHyperionConfig",
            "type"       : "adalight",
            "output"     : "/dev/ttyACM0",
            "rate"     : 460800,
            "delayAfterConnect"     : 0,
            "colorOrder" : "grb"
        },
    
        // COLOR CALIBRATION CONFIG
        "color" :
        {
            "channelAdjustment" :
            [
                {
                    "id"   : "default",
                    "leds" : "*",
                    "pureRed" :
                    {
                        "redChannel"        : 200,
                        "greenChannel"        : 0,
                        "blueChannel"        : 0
                    },
                    "pureGreen" :
                    {
                        "redChannel"        : 0,
                        "greenChannel"        : 200,
                        "blueChannel"        : 0
                    },
                    "pureBlue" :
                    {
                        "redChannel"        : 0,
                        "greenChannel"        : 0,
                        "blueChannel"        : 200
                    }
                }
            ],
            "temperature" :
            [
                {
                    "id"   : "default",
                    "leds" : "*",
                    "correctionValues" :
                    {
                        "red"     : 255,
                        "green"    : 255,
                        "blue"     : 255
                    }
                }
            ],
            "transform" :
            [
                {
                    "id"   : "default",
                    "leds" : "*",
                    "hsl" :
                    {
                        "saturationGain"    : 1.5000,
                        "luminanceGain"        : 1.0000,
                        "luminanceMinimum"        : 0.0000
                    },
                    "red" :
                    {
                        "threshold"     : 0.0000,
                        "gamma"         : 2.5000
                    },
                    "green" :
                    {
                        "threshold"     : 0.0000,
                        "gamma"         : 2.5000
                    },
                    "blue" :
                    {
                        "threshold"     : 0.0000,
                        "gamma"         : 2.5000
                    }
                }
            ],
        // SMOOTHING CONFIG
            "smoothing" :
            {
                "type"            : "linear",
                "time_ms"         : 100,
                "updateFrequency" : 50.0000,
                "updateDelay"     : 0
            }
        },
    
        // V4L2 GRABBER CONFIG
        "grabber-v4l2" :
        {
            "device" : "/dev/video0",
            "input" : 0,
            "standard" : "PAL",
            "width" : -1,
            "height" : -1,
            "frameDecimation" : 2,
            "sizeDecimation" : 1,
            "priority" : 700,
            "mode" : "2D",
            "cropLeft" : 10,
            "cropRight" : 8,
            "cropTop" : 2,
            "cropBottom" : 4,
            "redSignalThreshold" : 0.0,
            "greenSignalThreshold" : 0.0,
            "blueSignalThreshold" : 0.0
        },
    
        // BLACKBORDER CONFIG
        "blackborderdetector" :
        {
            "enable" : true,
            "threshold" : 0.0,
            "unknownFrameCnt" : 600,
            "borderFrameCnt" : 50,
            "maxInconsistentCnt" : 10,
            "blurRemoveCnt" : 1,
            "mode" : "default"
        },
    
        // BOOTEFFECT CONFIG
        "bootsequence" :
        {
            "color" : [0,0,0],
            "effect" : "Rainbow swirl fast",
            "duration_ms" : 3000,
            "priority" : 700
        },
    
        // JSON SERVER CONFIG
        "jsonServer" :
        {
            "port" : 19444
        },
    
        // PROTO SERVER CONFIG
        "protoServer" :
        {
            "port" : 19445
        },
    
        // EFFECT PATH
        "effects" :
        {
            "paths" :
            [
                "/storage/hyperion/effects",
                "/usr/share/hyperion/effects"
            ]
        },
    
        // NO FRAME GRABBER CONFIG
        // NO KODI CHECK CONFIG
        // NO BOBLIGHT SERVER CONFIG
        // NO JSON/PROTO FORWARD CONFIG
    
        // LED CONFIGURATION
        "leds" :
        [
            {
                "index" : 0,
                "hscan" : { "minimum" : 0.8148, "maximum" : 0.8519 },
                "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
            },
            {
                "index" : 1,
                "hscan" : { "minimum" : 0.8519, "maximum" : 0.8889 },
                "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
            },
            {
                "index" : 2,
                "hscan" : { "minimum" : 0.8889, "maximum" : 0.9259 },
                "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
            },
            {
                "index" : 3,
                "hscan" : { "minimum" : 0.9259, "maximum" : 0.9630 },
                "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
            },
            {
                "index" : 4,
                "hscan" : { "minimum" : 0.9630, "maximum" : 1.0000 },
                "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
            },
            {
                "index" : 5,
                "hscan" : { "minimum" : 0.9500, "maximum" : 1.0000 },
                "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
            },
            {
                "index" : 6,
                "hscan" : { "minimum" : 0.9500, "maximum" : 1.0000 },
                "vscan" : { "minimum" : 0.9333, "maximum" : 1.0000 }
            },
            {
                "index" : 7,
                "hscan" : { "minimum" : 0.9500, "maximum" : 1.0000 },
                "vscan" : { "minimum" : 0.8667, "maximum" : 0.9333 }
            },
            {
                "index" : 8,
                "hscan" : { "minimum" : 0.9500, "maximum" : 1.0000 },
                "vscan" : { "minimum" : 0.8000, "maximum" : 0.8667 }
            },
            {
                "index" : 9,
                "hscan" : { "minimum" : 0.9500, "maximum" : 1.0000 },
                "vscan" : { "minimum" : 0.7333, "maximum" : 0.8000 }
            },
            {
                "index" : 10,
                "hscan" : { "minimum" : 0.9500, "maximum" : 1.0000 },
                "vscan" : { "minimum" : 0.6667, "maximum" : 0.7333 }
            },
            {
                "index" : 11,
                "hscan" : { "minimum" : 0.9500, "maximum" : 1.0000 },
                "vscan" : { "minimum" : 0.6000, "maximum" : 0.6667 }
            },
            {
                "index" : 12,
                "hscan" : { "minimum" : 0.9500, "maximum" : 1.0000 },
                "vscan" : { "minimum" : 0.5333, "maximum" : 0.6000 }
            },
            {
                "index" : 13,
                "hscan" : { "minimum" : 0.9500, "maximum" : 1.0000 },
                "vscan" : { "minimum" : 0.4667, "maximum" : 0.5333 }
            },
            {
                "index" : 14,
                "hscan" : { "minimum" : 0.9500, "maximum" : 1.0000 },
                "vscan" : { "minimum" : 0.4000, "maximum" : 0.4667 }
            },
            {
                "index" : 15,
                "hscan" : { "minimum" : 0.9500, "maximum" : 1.0000 },
                "vscan" : { "minimum" : 0.3333, "maximum" : 0.4000 }
            },
            {
                "index" : 16,
                "hscan" : { "minimum" : 0.9500, "maximum" : 1.0000 },
                "vscan" : { "minimum" : 0.2667, "maximum" : 0.3333 }
            },
            {
                "index" : 17,
                "hscan" : { "minimum" : 0.9500, "maximum" : 1.0000 },
                "vscan" : { "minimum" : 0.2000, "maximum" : 0.2667 }
            },
            {
                "index" : 18,
                "hscan" : { "minimum" : 0.9500, "maximum" : 1.0000 },
                "vscan" : { "minimum" : 0.1333, "maximum" : 0.2000 }
            },
            {
                "index" : 19,
                "hscan" : { "minimum" : 0.9500, "maximum" : 1.0000 },
                "vscan" : { "minimum" : 0.0667, "maximum" : 0.1333 }
            },
            {
                "index" : 20,
                "hscan" : { "minimum" : 0.9500, "maximum" : 1.0000 },
                "vscan" : { "minimum" : 0.0000, "maximum" : 0.0667 }
            },
            {
                "index" : 21,
                "hscan" : { "minimum" : 0.9630, "maximum" : 1.0000 },
                "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
            },
            {
                "index" : 22,
                "hscan" : { "minimum" : 0.9259, "maximum" : 0.9630 },
                "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
            },
            {
                "index" : 23,
                "hscan" : { "minimum" : 0.8889, "maximum" : 0.9259 },
                "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
            },
            {
                "index" : 24,
                "hscan" : { "minimum" : 0.8519, "maximum" : 0.8889 },
                "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
            },
            {
                "index" : 25,
                "hscan" : { "minimum" : 0.8148, "maximum" : 0.8519 },
                "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
            },
            {
                "index" : 26,
                "hscan" : { "minimum" : 0.7778, "maximum" : 0.8148 },
                "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
            },
            {
                "index" : 27,
                "hscan" : { "minimum" : 0.7407, "maximum" : 0.7778 },
                "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
            },
            {
                "index" : 28,
                "hscan" : { "minimum" : 0.7037, "maximum" : 0.7407 },
                "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
            },
            {
                "index" : 29,
                "hscan" : { "minimum" : 0.6667, "maximum" : 0.7037 },
                "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
            },
            {
                "index" : 30,
                "hscan" : { "minimum" : 0.6296, "maximum" : 0.6667 },
                "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
            },
            {
                "index" : 31,
                "hscan" : { "minimum" : 0.5926, "maximum" : 0.6296 },
                "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
            },
            {
                "index" : 32,
                "hscan" : { "minimum" : 0.5556, "maximum" : 0.5926 },
                "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
            },
            {
                "index" : 33,
                "hscan" : { "minimum" : 0.5185, "maximum" : 0.5556 },
                "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
            },
            {
                "index" : 34,
                "hscan" : { "minimum" : 0.4815, "maximum" : 0.5185 },
                "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
            },
            {
                "index" : 35,
                "hscan" : { "minimum" : 0.4444, "maximum" : 0.4815 },
                "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
            },
            {
                "index" : 36,
                "hscan" : { "minimum" : 0.4074, "maximum" : 0.4444 },
                "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
            },
            {
                "index" : 37,
                "hscan" : { "minimum" : 0.3704, "maximum" : 0.4074 },
                "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
            },
            {
                "index" : 38,
                "hscan" : { "minimum" : 0.3333, "maximum" : 0.3704 },
                "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
            },
            {
                "index" : 39,
                "hscan" : { "minimum" : 0.2963, "maximum" : 0.3333 },
                "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
            },
            {
                "index" : 40,
                "hscan" : { "minimum" : 0.2593, "maximum" : 0.2963 },
                "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
            },
            {
                "index" : 41,
                "hscan" : { "minimum" : 0.2222, "maximum" : 0.2593 },
                "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
            },
            {
                "index" : 42,
                "hscan" : { "minimum" : 0.1852, "maximum" : 0.2222 },
                "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
            },
            {
                "index" : 43,
                "hscan" : { "minimum" : 0.1481, "maximum" : 0.1852 },
                "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
            },
            {
                "index" : 44,
                "hscan" : { "minimum" : 0.1111, "maximum" : 0.1481 },
                "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
            },
            {
                "index" : 45,
                "hscan" : { "minimum" : 0.0741, "maximum" : 0.1111 },
                "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
            },
            {
                "index" : 46,
                "hscan" : { "minimum" : 0.0370, "maximum" : 0.0741 },
                "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
            },
            {
                "index" : 47,
                "hscan" : { "minimum" : 0.0000, "maximum" : 0.0370 },
                "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
            },
            {
                "index" : 48,
                "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 },
                "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
            },
            {
                "index" : 49,
                "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 },
                "vscan" : { "minimum" : 0.0000, "maximum" : 0.0667 }
            },
            {
                "index" : 50,
                "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 },
                "vscan" : { "minimum" : 0.0667, "maximum" : 0.1333 }
            },
            {
                "index" : 51,
                "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 },
                "vscan" : { "minimum" : 0.1333, "maximum" : 0.2000 }
            },
            {
                "index" : 52,
                "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 },
                "vscan" : { "minimum" : 0.2000, "maximum" : 0.2667 }
            },
            {
                "index" : 53,
                "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 },
                "vscan" : { "minimum" : 0.2667, "maximum" : 0.3333 }
            },
            {
                "index" : 54,
                "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 },
                "vscan" : { "minimum" : 0.3333, "maximum" : 0.4000 }
            },
            {
                "index" : 55,
                "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 },
                "vscan" : { "minimum" : 0.4000, "maximum" : 0.4667 }
            },
            {
                "index" : 56,
                "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 },
                "vscan" : { "minimum" : 0.4667, "maximum" : 0.5333 }
            },
            {
                "index" : 57,
                "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 },
                "vscan" : { "minimum" : 0.5333, "maximum" : 0.6000 }
            },
            {
                "index" : 58,
                "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 },
                "vscan" : { "minimum" : 0.6000, "maximum" : 0.6667 }
            },
            {
                "index" : 59,
                "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 },
                "vscan" : { "minimum" : 0.6667, "maximum" : 0.7333 }
            },
            {
                "index" : 60,
                "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 },
                "vscan" : { "minimum" : 0.7333, "maximum" : 0.8000 }
            },
            {
                "index" : 61,
                "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 },
                "vscan" : { "minimum" : 0.8000, "maximum" : 0.8667 }
            },
            {
                "index" : 62,
                "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 },
                "vscan" : { "minimum" : 0.8667, "maximum" : 0.9333 }
            },
            {
                "index" : 63,
                "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 },
                "vscan" : { "minimum" : 0.9333, "maximum" : 1.0000 }
            },
            {
                "index" : 64,
                "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 },
                "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
            },
            {
                "index" : 65,
                "hscan" : { "minimum" : 0.0000, "maximum" : 0.0370 },
                "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
            },
            {
                "index" : 66,
                "hscan" : { "minimum" : 0.0370, "maximum" : 0.0741 },
                "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
            },
            {
                "index" : 67,
                "hscan" : { "minimum" : 0.0741, "maximum" : 0.1111 },
                "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
            },
            {
                "index" : 68,
                "hscan" : { "minimum" : 0.1111, "maximum" : 0.1481 },
                "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
            },
            {
                "index" : 69,
                "hscan" : { "minimum" : 0.1481, "maximum" : 0.1852 },
                "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
            },
            {
                "index" : 70,
                "hscan" : { "minimum" : 0.1852, "maximum" : 0.2222 },
                "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
            },
            {
                "index" : 71,
                "hscan" : { "minimum" : 0.2222, "maximum" : 0.2593 },
                "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
            },
            {
                "index" : 72,
                "hscan" : { "minimum" : 0.2593, "maximum" : 0.2963 },
                "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
            },
            {
                "index" : 73,
                "hscan" : { "minimum" : 0.2963, "maximum" : 0.3333 },
                "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
            },
            {
                "index" : 74,
                "hscan" : { "minimum" : 0.3333, "maximum" : 0.3704 },
                "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
            },
            {
                "index" : 75,
                "hscan" : { "minimum" : 0.3704, "maximum" : 0.4074 },
                "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
            },
            {
                "index" : 76,
                "hscan" : { "minimum" : 0.4074, "maximum" : 0.4444 },
                "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
            },
            {
                "index" : 77,
                "hscan" : { "minimum" : 0.4444, "maximum" : 0.4815 },
                "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
            },
            {
                "index" : 78,
                "hscan" : { "minimum" : 0.4815, "maximum" : 0.5185 },
                "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
            },
            {
                "index" : 79,
                "hscan" : { "minimum" : 0.5185, "maximum" : 0.5556 },
                "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
            },
            {
                "index" : 80,
                "hscan" : { "minimum" : 0.5556, "maximum" : 0.5926 },
                "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
            },
            {
                "index" : 81,
                "hscan" : { "minimum" : 0.5926, "maximum" : 0.6296 },
                "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
            },
            {
                "index" : 82,
                "hscan" : { "minimum" : 0.6296, "maximum" : 0.6667 },
                "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
            },
            {
                "index" : 83,
                "hscan" : { "minimum" : 0.6667, "maximum" : 0.7037 },
                "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
            },
            {
                "index" : 84,
                "hscan" : { "minimum" : 0.7037, "maximum" : 0.7407 },
                "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
            },
            {
                "index" : 85,
                "hscan" : { "minimum" : 0.7407, "maximum" : 0.7778 },
                "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
            },
            {
                "index" : 86,
                "hscan" : { "minimum" : 0.7778, "maximum" : 0.8148 },
                "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
            }
        ],
    
        "endOfJson" : "endOfJson"
    }
    
    Arduino Sketch
    Code:
    #include "FastLED.h"
    
    // How many leds in your strip?
    #define NUM_LEDS 87
    
    // For led chips like Neopixels, which have a data line, ground, and power, you just
    // need to define DATA_PIN.  For led chipsets that are SPI based (four wires - data, clock,
    // ground, and power), like the LPD8806 define both DATA_PIN and CLOCK_PIN
    #define DATA_PIN 6
    
    #define COLOR_ORDER GRB
    
    // Adalight sends a "Magic Word" (defined in /etc/boblight.conf) before sending the pixel data
    uint8_t prefix[] = {'A', 'd', 'a'}, hi, lo, chk, i;
    
    // Baudrate, higher rate allows faster refresh rate and more LEDs (defined in /etc/boblight.conf)
    #define serialRate 460800
    
    // Define the array of leds
    CRGB leds[NUM_LEDS];
    
    void setup() {
          // Uncomment/edit one of the following lines for your leds arrangement.
          // FastLED.addLeds<TM1803, DATA_PIN, RGB>(leds, NUM_LEDS);
          // FastLED.addLeds<TM1804, DATA_PIN, RGB>(leds, NUM_LEDS);
          // FastLED.addLeds<TM1809, DATA_PIN, RGB>(leds, NUM_LEDS);
          // FastLED.addLeds<WS2811, DATA_PIN, RGB>(leds, NUM_LEDS);
          // FastLED.addLeds<WS2812, DATA_PIN, RGB>(leds, NUM_LEDS);
             FastLED.addLeds<WS2812B, DATA_PIN, RGB>(leds, NUM_LEDS);
          // FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS);
          // FastLED.addLeds<UCS1903, DATA_PIN, RGB>(leds, NUM_LEDS);
          // FastLED.addLeds<UCS1903B, DATA_PIN, RGB>(leds, NUM_LEDS);
          // FastLED.addLeds<GW6205, DATA_PIN, RGB>(leds, NUM_LEDS);
          // FastLED.addLeds<GW6205_400, DATA_PIN, RGB>(leds, NUM_LEDS);
       
          // FastLED.addLeds<WS2801, RGB>(leds, NUM_LEDS);
          // FastLED.addLeds<SM16716, RGB>(leds, NUM_LEDS);
          // FastLED.addLeds<LPD8806, RGB>(leds, NUM_LEDS);
    
          // FastLED.addLeds<WS2801, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
          // FastLED.addLeds<SM16716, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
          // FastLED.addLeds<LPD8806, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
       
            // initial RGB flash
            LEDS.showColor(CRGB(255, 0, 0));
            delay(500);
            LEDS.showColor(CRGB(0, 255, 0));
            delay(500);
            LEDS.showColor(CRGB(0, 0, 255));
            delay(500);
            LEDS.showColor(CRGB(0, 0, 0));
         
            Serial.begin(serialRate);
            Serial.print("Ada\n"); // Send "Magic Word" string to host
    
    }
    
    void loop() {
      // wait for first byte of Magic Word
      for(i = 0; i < sizeof prefix; ++i) {
        waitLoop: while (!Serial.available()) ;;
        // Check next byte in Magic Word
        if(prefix[i] == Serial.read()) continue;
        // otherwise, start over
        i = 0;
        goto waitLoop;
      }
    
      // Hi, Lo, Checksum
    
      while (!Serial.available()) ;;
      hi=Serial.read();
      while (!Serial.available()) ;;
      lo=Serial.read();
      while (!Serial.available()) ;;
      chk=Serial.read();
    
      // if checksum does not match go back to wait
      if (chk != (hi ^ lo ^ 0x55))
      {
        i=0;
        goto waitLoop;
      }
    
      memset(leds, 0, NUM_LEDS * sizeof(struct CRGB));
      // read the transmission data and set LED values
      for (uint8_t i = 0; i < NUM_LEDS; i++) {
        byte r, g, b; 
        while(!Serial.available());
        r = Serial.read();
        while(!Serial.available());
        g = Serial.read();
        while(!Serial.available());
        b = Serial.read();
        leds[i].r = r;
        leds[i].g = g;
        leds[i].b = b;
      }
      // shows new values
    FastLED.show();
    }
     
  2. TPmodding

    TPmodding Administrator Staff Member Administrator

    Messages:
    1,886
    Hardware:
    RPi1/Zero, RPi2, RPi3, +Arduino, +nodeMCU/ESP8266
    "frameDecimation" : 2,
    "sizeDecimation" : 1,

    is to high...go step by step down to figure out which one works for you
     
  3. anna mae

    anna mae New Member

    Messages:
    4
    Hardware:
    RPi1/Zero, +Arduino, +PhilipsHue
    i'll give that a try! thank you
     
  4. anna mae

    anna mae New Member

    Messages:
    4
    Hardware:
    RPi1/Zero, +Arduino, +PhilipsHue
    I put the frame decimation to 2 and size decimation to 4. That worked! lights are now smooth.