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

SOLVED WS2801 - What can kill your LEDs?

Discussion in 'Hardware Support' started by Bob M, 26 June 2019.

  1. Bob M

    Bob M New Member

    Messages:
    14
    Hardware:
    RPi3
    I've put together a Pi 3 with grabber using WS2801s and everything's worked as expected for the few weeks that it's taken me to get set up.

    So last night I decided I was ready to try it out and watch some Netflix with everything turned on, and it worked great for about 30 minutes before the LEDs just stopped dead. Rebooted, fully powercycled everything - nothing worked.

    I quickly spotted that although previously switching the system on caused the first LED the light up before Hyperion kicked-in and did the swirl, I'm now getting nothing at all when the LEDs receive power. A quick check with a multimeter shows there's 5v at the strip, so it looks like the first LED/chip is fried (or maybe more of them?)

    My next step is to cut off the first LED and attach the cables to the next one...
    But I can't understand how/why the first one got damaged - one minute everything's working and then suddenly it's not.

    So the question is: what can cause damage to the LED strip, and how can I prevent it from happening again?

    Aside from using a level shifter (which I gather isn't used by everyone) my setup is standard - WS2801 connected to the SPI pins on a Pi. I've got a 10A supply (also powering the Pi) incase that's relevant.

    I suppose last night was the longest continual time that the strip had been illuminated, and at the time of failure there was a lot of white (which pulls the most power?).

    Any ideas?
     
  2. Paulchen-Panther

    Paulchen-Panther Active Member Developer

    Messages:
    208
    What brand is your PSU?
     
  3. Bob M

    Bob M New Member

    Messages:
    14
    Hardware:
    RPi3
    It's a Tesfish 10A https://www.amazon.co.uk/gp/product/B07C4SNYCH/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

    Though after spending time checking connections it seems I had a loose data/clock wire coming from my levelshifter, and I was able to get the first LED to light up after removing and reseating the connection a few times.... after fixing the connections and triple-checking with a multimeter I'm back to getting nothing though, so I'm wondering if the shifter somehow got fried. I've ordered a replacement to see if it makes a difference.
    I might buy a cheap LED controller box so I can double-check that the LEDs are still working in any case!
     
  4. TPmodding

    TPmodding Administrator Staff Member Administrator

    Messages:
    1,296
    Hardware:
    RPi1/Zero, RPi2, RPi3, +Arduino, +nodeMCU/ESP8266
    an arduino is enough to check if the leds are working or not
     
  5. kevinlekiller

    kevinlekiller New Member

    Messages:
    4
    Hardware:
    RPi2
    Not sure if relevant but I was using a power supply (15 amps) for the pi + LEDs (with 230 leds - pretty close to maxing the 15 amps), when all the LED's are white the voltage drops to around ~4.7v, I was having issues with flickering so I switched the pi to its own power supply and it's been good now for weeks. Using "CLT1070" TTL level converter.
     
  6. Bob M

    Bob M New Member

    Messages:
    14
    Hardware:
    RPi3
    Thanks for the useful info guys, I'm gonna get an Arduino on the LEDs to make sure they're fine (haven't had time yet).
    I did try bypassing the levelshifter (so directly attaching the Pi to the LEDs with minimum cable, aprox 10cm) and still nothing. So it's either the Pi, the LEDs or the cables that I crimped myself which are going from the Pi to the shifter. I checked them with a multimeter when I made the cables but I'm always supicious of anything home made!
     
  7. Bob M

    Bob M New Member

    Messages:
    14
    Hardware:
    RPi3
    So this is very weird.

    To reiterate - I've got the SPI pins of the Pi connected to a levelshifter, which is then connected to the LEDs by a few metres of cable.
    Everything runs from the same PSU so there's common 0v.
    It was all working fine then just suddenly stopped dead last week - getting nothing on the LEDs, not even the first LED lighting up in a random colour while booting (which is what I'd always seen previously).

    I've tested the SPI interface on the PI using this loopback test:
    https://importgeek.wordpress.com/2017/09/11/raspberry-pi-spi-loopback-testing/
    ...and it seems to be working fine.

    I've tested the cabling with a multimeter. I've tried bypassing the level shifter (so connecting the SPI pins directly the the LEDs, without the few metres of cable - still doesn't work) and have also replaced the level shifter with a new one.

    Also bought my first Arduino and set it up to drive WS2801s - which worked perfectly (much to my surprise - this was my first time setting up an Arduino and I was exepecting to at least hit one or two hiccups).

    So everything appears to work fine individually!

    Then it occurred to me that there's one thing that hasn't been tested - the CLK pin on the SPI interface. The loopback test connects MISO to MOSI but doesn't use the CLK pin.

    So the one thing left to try is replacing the Pi, which I'm going to do this week.

    If it does indeed turn out to be a damaged CLK pin - how the hell did that happen?
    I'm positive that all connections were sound and that nothing shorted.... my levelshifter is bi-directional so I briefly wondered if it somehow fed something back to the Pi from the LEDs, but searching the forums it seems that bi-directional shifters are the norm.

    I'm just worried that I'll eventually damage the new Pi in the same way - any suggestions?


    EDIT: I've also removed and reinstalled Hyperion, which had no effect.

    It's also occurred to me that since I've bought the Audino, could I just use that (connected to the Pi via USB) to drive the LEDs? Would it be possible and/or would there be any drawbacks to doing this?
     
    Last edited: 3 July 2019
  8. Bob M

    Bob M New Member

    Messages:
    14
    Hardware:
    RPi3
    This just gets weirder.

    I've hooked the Arduino up via USB and uploaded the sketch below. I see the 2 flashes from the LEDs when it boots (and also when I restart Hyperion). I'm seeing rapid flashes from the onboard LED on the Arduino when Hyperion is running - presumably to indicate serial communication.
    I'm using "adalight" as the type and ttyUSB0 (the only device which shows up when the Arduino is connected, and there's nothing in Hyperion's logs to suggest anything's wrong.

    But I'm still getting nothing from my LEDs. There's clearly an issue between Hyperion and the Arduino - since I get the flashes when it starts up it proves that the Arduino is controlling the LEDs - but I can't understand what the problem is.

    Any suggestions?

    Code:
    #include "FastLED.h"
    
    #define ANALOG_MODE_AVERAGE  0
    #define ANALOG_MODE_LAST_LED 1
    
    /**************************************
       S E T U P
    
       set following values to your needs
    **************************************/
    
    #define INITIAL_LED_TEST_ENABLED true
    #define INITIAL_LED_TEST_BRIGHTNESS 32  // 0..255
    #define INITIAL_LED_TEST_TIME_MS 500  // 10..
    
    // Number of leds in your strip. set to "1" and ANALOG_OUTPUT_ENABLED to "true" to activate analog only
    // As of 26/1/2017:
    // 582 leaves ZERO bytes free and this
    // 410 is ok
    // tested with 500 leds and is fine (despite the warning)
    #define MAX_LEDS 88
    
    // type of your led controller, possible values, see below
    #define LED_TYPE WS2801
    
    // 3 wire (pwm): NEOPIXEL BTM1829 TM1812 TM1809 TM1804 TM1803 UCS1903 UCS1903B UCS1904 UCS2903 WS2812 WS2852
    //               S2812B SK6812 SK6822 APA106 PL9823 WS2811 WS2813 APA104 WS2811_40 GW6205 GW6205_40 LPD1886 LPD1886_8BIT
    // 4 wire (spi): LPD8806 WS2801 WS2803 SM16716 P9813 APA102 SK9822 DOTSTAR
    
    // For 3 wire led stripes line Neopixel/Ws2812, 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), both defines DATA_PIN and CLOCK_PIN are needed
    
    // DATA_PIN, or DATA_PIN, CLOCK_PIN
    //#define LED_PINS 6        // 3 wire leds
    #define LED_PINS 6, 4  // 4 wire leds
    
    #define COLOR_ORDER RGB  // colororder of the stripe, set RGB in hyperion
    
    #define OFF_TIMEOUT 15000    // ms to switch off after no data was received, set 0 to deactivate
    
    // analog rgb uni color led stripe - using of hyperion smoothing is recommended
    // ATTENTION  this pin config is default for atmega328 based arduinos, others might work to
    //            if you have flickering analog leds this might be caused by unsynced pwm signals
    //            try other pins is more or less the only thing that helps
    #define ANALOG_OUTPUT_ENABLED false
    #define ANALOG_MODE           ANALOG_MODE_LAST_LED  // use ANALOG_MODE_AVERAGE or ANALOG_MODE_LAST_LED
    #define ANALOG_GROUND_PIN     8                     // additional ground pin to make wiring a bit easier
    #define ANALOG_RED_PIN        9
    #define ANALOG_GREEN_PIN      10
    #define ANALOG_BLUE_PIN       11
    
    // overall color adjustments
    #define ANALOG_BRIGHTNESS_RED   255              // maximum brightness for analog 0-255
    #define ANALOG_BRIGHTNESS_GREEN 255              // maximum brightness for analog 0-255
    #define ANALOG_BRIGHTNESS_BLUE  255              // maximum brightness for analog 0-255
    
    #define BRIGHTNESS 255                      // maximum brightness 0-255
    #define DITHER_MODE BINARY_DITHER           // BINARY_DITHER or DISABLE_DITHER
    #define COLOR_TEMPERATURE CRGB(255,255,255) // RGB value describing the color temperature
    #define COLOR_CORRECTION  TypicalLEDStrip   // predefined fastled color correction
    //#define COLOR_CORRECTION  CRGB(255,255,255) // or RGB value describing the color correction
    
    // Baudrate, higher rate allows faster refresh rate and more LEDs
    //#define serialRate 460800      // use 115200 for ftdi based boards
    #define serialRate 115200      // use 115200 for ftdi based boards
    //#define serialRate 500000         // use 115200 for ftdi based boards
    
    
    /**************************************
       A D A L I G H T   C O D E
    
       no user changes needed
    **************************************/
    
    // 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;
    
    unsigned long endTime;
    
    // Define the array of leds
    CRGB leds[MAX_LEDS];
    
    // set rgb to analog led stripe
    void showAnalogRGB(const CRGB& led) {
      if (ANALOG_OUTPUT_ENABLED) {
        byte r = map(led.r, 0,255,0,ANALOG_BRIGHTNESS_RED);
        byte g = map(led.g, 0,255,0,ANALOG_BRIGHTNESS_GREEN);
        byte b = map(led.b, 0,255,0,ANALOG_BRIGHTNESS_BLUE);
        analogWrite(ANALOG_RED_PIN  , r);
        analogWrite(ANALOG_GREEN_PIN, g);
        analogWrite(ANALOG_BLUE_PIN , b);
      }
    }
    
    // set color to all leds
    void showColor(const CRGB& led) {
      #if MAX_LEDS > 1 || ANALOG_OUTPUT_ENABLED == false
      LEDS.showColor(led);
      #endif
      showAnalogRGB(led);
    }
    
    // switch of digital and analog leds
    void switchOff() {
      #if MAX_LEDS > 1 || ANALOG_OUTPUT_ENABLED == false
      memset(leds, 0, MAX_LEDS * sizeof(struct CRGB));
      FastLED.show();
      #endif
      showAnalogRGB(leds[0]);
    }
    
    // function to check if serial data is available
    // if timeout occured leds switch of, if configured
    bool checkIncommingData() {
      boolean dataAvailable = true;
      while (!Serial.available()) {
        if ( OFF_TIMEOUT > 0 && endTime < millis()) {
          switchOff();
          dataAvailable = false;
          endTime = millis() + OFF_TIMEOUT;
        }
      }
    
      return dataAvailable;
    }
    
    // main function that setups and runs the code
    void setup() {
      Serial.begin(serialRate);
    
      // analog output
      if (ANALOG_OUTPUT_ENABLED) {
        // additional ground pin to make wiring a bit easier
        pinMode(ANALOG_GROUND_PIN, OUTPUT);
        digitalWrite(ANALOG_GROUND_PIN, LOW);
        pinMode(ANALOG_BLUE_PIN , OUTPUT);
        pinMode(ANALOG_RED_PIN  , OUTPUT);
        pinMode(ANALOG_GREEN_PIN, OUTPUT);
      }
    
      int ledCount = MAX_LEDS;
      if (ANALOG_MODE == ANALOG_MODE_LAST_LED) {
        ledCount--;
      }
    
      #if MAX_LEDS > 1 || ANALOG_OUTPUT_ENABLED == false
        FastLED.addLeds<LED_TYPE, LED_PINS, COLOR_ORDER>(leds, ledCount);
      #endif
     
      // color adjustments
      FastLED.setBrightness ( BRIGHTNESS );
      FastLED.setTemperature( COLOR_TEMPERATURE );
      FastLED.setCorrection ( COLOR_CORRECTION );
      FastLED.setDither     ( DITHER_MODE );
    
      // initial RGB flash
      #if INITIAL_LED_TEST_ENABLED == true
      for (int v=0;v<INITIAL_LED_TEST_BRIGHTNESS;v++)
      {
        showColor(CRGB(v,v,v)); 
        delay(INITIAL_LED_TEST_TIME_MS/2/INITIAL_LED_TEST_BRIGHTNESS);
      }
      for (int v=0;v<INITIAL_LED_TEST_BRIGHTNESS;v++)
      {
        showColor(CRGB(v,v,v)); 
        delay(INITIAL_LED_TEST_TIME_MS/2/INITIAL_LED_TEST_BRIGHTNESS);
      }
      #endif
      showColor(CRGB(0, 0, 0));
    
      Serial.print("Ada\n"); // Send "Magic Word" string to host
    
    
      boolean transmissionSuccess;
      unsigned long sum_r, sum_g, sum_b;
    
      // loop() is avoided as even that small bit of function overhead
      // has a measurable impact on this code's overall throughput.
      for(;;) {
        // wait for first byte of Magic Word
        for (i = 0; i < sizeof prefix; ++i) {
          // If next byte is not in Magic Word, the start over
          if (!checkIncommingData() || prefix[i] != Serial.read()) {
            i = 0;
          }
        }
    
        // Hi, Lo, Checksum
        if (!checkIncommingData()) continue;
        hi = Serial.read();
        if (!checkIncommingData()) continue;
        lo = Serial.read();
        if (!checkIncommingData()) continue;
        chk = Serial.read();
    
        // if checksum does not match go back to wait
        if (chk != (hi ^ lo ^ 0x55)) continue;
    
        memset(leds, 0, MAX_LEDS * sizeof(struct CRGB));
        transmissionSuccess = true;
        sum_r = 0;
        sum_g = 0;
        sum_b = 0;
    
        int num_leds = min ( MAX_LEDS, (hi<<8) + lo + 1 );
    
        // read the transmission data and set LED values
        for (int idx = 0; idx < num_leds; idx++) {
          byte r, g, b;
          if (!checkIncommingData()) {
            transmissionSuccess = false;
            break;
          }
          r = Serial.read();
          if (!checkIncommingData()) {
            transmissionSuccess = false;
            break;
          }
          g = Serial.read();
          if (!checkIncommingData()) {
            transmissionSuccess = false;
            break;
          }
          b = Serial.read();
          leds[idx].r = r;
          leds[idx].g = g;
          leds[idx].b = b;
          #if ANALOG_OUTPUT_ENABLED == true && ANALOG_MODE == ANALOG_MODE_AVERAGE
              sum_r += r;
              sum_g += g;
              sum_b += b;
          #endif
        }
    
        // shows new values
        if (transmissionSuccess) {
          endTime = millis() + OFF_TIMEOUT;
          #if MAX_LEDS > 1 || ANALOG_OUTPUT_ENABLED == false
          FastLED.show();
          #endif
    
          #if ANALOG_OUTPUT_ENABLED == true
            #if ANALOG_MODE == ANALOG_MODE_LAST_LED
              showAnalogRGB(leds[MAX_LEDS-1]);
            #else
              showAnalogRGB(CRGB(sum_r/MAX_LEDS, sum_g/MAX_LEDS, sum_b/MAX_LEDS));
             #endif
          #endif
        }
      }
    } // end of setup
    
    void loop() {
      // Not used. See note in setup() function.
    }
    
    
    This is my config file:
    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/ttyUSB0",
                    "rate"     : 115200,
                    "delayAfterConnect"     : 1500,
                    "colorOrder" : "rgb"
            },
    
            // COLOR CALIBRATION CONFIG
            "color" :
            {
                    "channelAdjustment" :
                    [
                            {
                                    "id"   : "default",
                                    "leds" : "*",
                                    "pureRed" :
                                    {
                                            "redChannel"            : 255,
                                            "greenChannel"          : 0,
                                            "blueChannel"           : 0
                                    },
                                    "pureGreen" :
                                    {
                                            "redChannel"            : 0,
                                            "greenChannel"          : 255,
                                            "blueChannel"           : 0
                                    },
                                    "pureBlue" :
                                    {
                                            "redChannel"            : 0,
                                            "greenChannel"          : 0,
                                            "blueChannel"           : 255
                                    }
                            }
                    ],
                    "temperature" :
                    [
                            {
                                    "id"   : "default",
                                    "leds" : "*",
                                    "correctionValues" :
                                    {
                                            "red"   : 255,
                                            "green" : 255,
                                            "blue"  : 255
                                    }
                            }
                    ],
                    "transform" :
                    [
                            {
                                    "id"   : "default",
                                    "leds" : "*",
                                    "hsl" :
                                    {
                                            "saturationGain"        : 1.0000,
                                            "luminanceGain"         : 0.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"         : 200,
                            "updateFrequency" : 20.0000,
                            "updateDelay"     : 0
                    }
            },
    
            // V4L2 GRABBER CONFIG
            "grabber-v4l2" :
            {
                    "device" : "/dev/video0",
                    "input" : 0,
                    "standard" : "NTSC",
                    "width" : -1,
                    "height" : -1,
                    "frameDecimation" : 2,
                    "sizeDecimation" : 8,
                    "priority" : 900,
                    "mode" : "2D",
                    "cropLeft" : 20,
                    "cropRight" : 28,
                    "cropTop" : 12,
                    "cropBottom" : 16,
                    "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.0000, "maximum" : 0.0357 },
                            "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
                    },
                    {
                            "index" : 1,
                            "hscan" : { "minimum" : 0.0357, "maximum" : 0.0714 },
                            "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
                    },
                    {
                            "index" : 2,
                            "hscan" : { "minimum" : 0.0714, "maximum" : 0.1071 },
                            "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
                    },
                    {
                            "index" : 3,
                            "hscan" : { "minimum" : 0.1071, "maximum" : 0.1429 },
                            "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
                    },
                    {
                            "index" : 4,
                            "hscan" : { "minimum" : 0.1429, "maximum" : 0.1786 },
                            "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
                    },
                    {
                            "index" : 5,
                            "hscan" : { "minimum" : 0.1786, "maximum" : 0.2143 },
                            "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
                    },
                    {
                            "index" : 6,
                            "hscan" : { "minimum" : 0.2143, "maximum" : 0.2500 },
                            "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
                    },
                    {
                            "index" : 7,
                            "hscan" : { "minimum" : 0.2500, "maximum" : 0.2857 },
                            "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
                    },
                    {
                            "index" : 8,
                            "hscan" : { "minimum" : 0.2857, "maximum" : 0.3214 },
                            "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
                    },
                    {
                            "index" : 9,
                            "hscan" : { "minimum" : 0.3214, "maximum" : 0.3571 },
                            "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
                    },
                    {
                            "index" : 10,
                            "hscan" : { "minimum" : 0.3571, "maximum" : 0.3929 },
                            "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
                    },
                    {
                            "index" : 11,
                            "hscan" : { "minimum" : 0.3929, "maximum" : 0.4286 },
                            "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
                    },
                    {
                            "index" : 12,
                            "hscan" : { "minimum" : 0.4286, "maximum" : 0.4643 },
                            "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
                    },
                    {
                            "index" : 13,
                            "hscan" : { "minimum" : 0.4643, "maximum" : 0.5000 },
                            "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
                    },
                    {
                            "index" : 14,
                            "hscan" : { "minimum" : 0.5000, "maximum" : 0.5357 },
                            "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
                    },
                    {
                            "index" : 15,
                            "hscan" : { "minimum" : 0.5357, "maximum" : 0.5714 },
                            "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
                    },
                    {
                            "index" : 16,
                            "hscan" : { "minimum" : 0.5714, "maximum" : 0.6071 },
                            "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
                    },
                    {
                            "index" : 17,
                            "hscan" : { "minimum" : 0.6071, "maximum" : 0.6429 },
                            "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
                    },
                    {
                            "index" : 18,
                            "hscan" : { "minimum" : 0.6429, "maximum" : 0.6786 },
                            "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
                    },
                    {
                            "index" : 19,
                            "hscan" : { "minimum" : 0.6786, "maximum" : 0.7143 },
                            "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
                    },
                    {
                            "index" : 20,
                            "hscan" : { "minimum" : 0.7143, "maximum" : 0.7500 },
                            "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
                    },
                    {
                            "index" : 21,
                            "hscan" : { "minimum" : 0.7500, "maximum" : 0.7857 },
                            "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
                    },
                    {
                            "index" : 22,
                            "hscan" : { "minimum" : 0.7857, "maximum" : 0.8214 },
                            "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
                    },
                    {
                            "index" : 23,
                            "hscan" : { "minimum" : 0.8214, "maximum" : 0.8571 },
                            "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
                    },
                    {
                            "index" : 24,
                            "hscan" : { "minimum" : 0.8571, "maximum" : 0.8929 },
                            "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
                    },
                    {
                            "index" : 25,
                            "hscan" : { "minimum" : 0.8929, "maximum" : 0.9286 },
                            "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
                    },
                    {
                            "index" : 26,
                            "hscan" : { "minimum" : 0.9286, "maximum" : 0.9643 },
                            "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
                    },
                    {
                            "index" : 27,
                            "hscan" : { "minimum" : 0.9643, "maximum" : 1.0000 },
                            "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
                    },
                    {
                            "index" : 28,
                            "hscan" : { "minimum" : 0.9500, "maximum" : 1.0000 },
                            "vscan" : { "minimum" : 0.9375, "maximum" : 1.0000 }
                    },
                    {
                            "index" : 29,
                            "hscan" : { "minimum" : 0.9500, "maximum" : 1.0000 },
                            "vscan" : { "minimum" : 0.8750, "maximum" : 0.9375 }
                    },
                    {
                            "index" : 30,
                            "hscan" : { "minimum" : 0.9500, "maximum" : 1.0000 },
                            "vscan" : { "minimum" : 0.8125, "maximum" : 0.8750 }
                    },
                    {
                            "index" : 31,
                            "hscan" : { "minimum" : 0.9500, "maximum" : 1.0000 },
                            "vscan" : { "minimum" : 0.7500, "maximum" : 0.8125 }
                    },
                    {
                            "index" : 32,
                            "hscan" : { "minimum" : 0.9500, "maximum" : 1.0000 },
                            "vscan" : { "minimum" : 0.6875, "maximum" : 0.7500 }
                    },
                    {
                            "index" : 33,
                            "hscan" : { "minimum" : 0.9500, "maximum" : 1.0000 },
                            "vscan" : { "minimum" : 0.6250, "maximum" : 0.6875 }
                    },
                    {
                            "index" : 34,
                            "hscan" : { "minimum" : 0.9500, "maximum" : 1.0000 },
                            "vscan" : { "minimum" : 0.5625, "maximum" : 0.6250 }
                    },
                    {
                            "index" : 35,
                            "hscan" : { "minimum" : 0.9500, "maximum" : 1.0000 },
                            "vscan" : { "minimum" : 0.5000, "maximum" : 0.5625 }
                    },
                    {
                            "index" : 36,
                            "hscan" : { "minimum" : 0.9500, "maximum" : 1.0000 },
                            "vscan" : { "minimum" : 0.4375, "maximum" : 0.5000 }
                    },
                    {
                            "index" : 37,
                            "hscan" : { "minimum" : 0.9500, "maximum" : 1.0000 },
                            "vscan" : { "minimum" : 0.3750, "maximum" : 0.4375 }
                    },
                    {
                            "index" : 38,
                            "hscan" : { "minimum" : 0.9500, "maximum" : 1.0000 },
                            "vscan" : { "minimum" : 0.3125, "maximum" : 0.3750 }
                    },
                    {
                            "index" : 39,
                            "hscan" : { "minimum" : 0.9500, "maximum" : 1.0000 },
                            "vscan" : { "minimum" : 0.2500, "maximum" : 0.3125 }
                    },
                    {
                            "index" : 40,
                            "hscan" : { "minimum" : 0.9500, "maximum" : 1.0000 },
                            "vscan" : { "minimum" : 0.1875, "maximum" : 0.2500 }
                    },
                    {
                            "index" : 41,
                            "hscan" : { "minimum" : 0.9500, "maximum" : 1.0000 },
                            "vscan" : { "minimum" : 0.1250, "maximum" : 0.1875 }
                    },
                    {
                            "index" : 42,
                            "hscan" : { "minimum" : 0.9500, "maximum" : 1.0000 },
                            "vscan" : { "minimum" : 0.0625, "maximum" : 0.1250 }
                    },
                    {
                            "index" : 43,
                            "hscan" : { "minimum" : 0.9500, "maximum" : 1.0000 },
                            "vscan" : { "minimum" : 0.0000, "maximum" : 0.0625 }
                    },
                    {
                            "index" : 44,
                            "hscan" : { "minimum" : 0.9643, "maximum" : 1.0000 },
                            "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
                    },
                    {
                            "index" : 45,
                            "hscan" : { "minimum" : 0.9286, "maximum" : 0.9643 },
                            "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
                    },
                    {
                            "index" : 46,
                            "hscan" : { "minimum" : 0.8929, "maximum" : 0.9286 },
                            "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
                    },
                    {
                            "index" : 47,
                            "hscan" : { "minimum" : 0.8571, "maximum" : 0.8929 },
                            "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
                    },
                    {
                            "index" : 48,
                            "hscan" : { "minimum" : 0.8214, "maximum" : 0.8571 },
                            "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
                    },
                    {
                            "index" : 49,
                            "hscan" : { "minimum" : 0.7857, "maximum" : 0.8214 },
                            "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
                    },
                    {
                            "index" : 50,
                            "hscan" : { "minimum" : 0.7500, "maximum" : 0.7857 },
                            "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
                    },
                    {
                            "index" : 51,
                            "hscan" : { "minimum" : 0.7143, "maximum" : 0.7500 },
                            "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
                    },
                    {
                            "index" : 52,
                            "hscan" : { "minimum" : 0.6786, "maximum" : 0.7143 },
                            "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
                    },
                    {
                            "index" : 53,
                            "hscan" : { "minimum" : 0.6429, "maximum" : 0.6786 },
                            "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
                    },
                    {
                            "index" : 54,
                            "hscan" : { "minimum" : 0.6071, "maximum" : 0.6429 },
                            "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
                    },
                    {
                            "index" : 55,
                            "hscan" : { "minimum" : 0.5714, "maximum" : 0.6071 },
                            "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
                    },
                    {
                            "index" : 56,
                            "hscan" : { "minimum" : 0.5357, "maximum" : 0.5714 },
                            "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
                    },
                    {
                            "index" : 57,
                            "hscan" : { "minimum" : 0.5000, "maximum" : 0.5357 },
                            "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
                    },
                    {
                            "index" : 58,
                            "hscan" : { "minimum" : 0.4643, "maximum" : 0.5000 },
                            "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
                    },
                    {
                            "index" : 59,
                            "hscan" : { "minimum" : 0.4286, "maximum" : 0.4643 },
                            "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
                    },
                    {
                            "index" : 60,
                            "hscan" : { "minimum" : 0.3929, "maximum" : 0.4286 },
                            "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
                    },
                    {
                            "index" : 61,
                            "hscan" : { "minimum" : 0.3571, "maximum" : 0.3929 },
                            "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
                    },
                    {
                            "index" : 62,
                            "hscan" : { "minimum" : 0.3214, "maximum" : 0.3571 },
                            "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
                    },
                    {
                            "index" : 63,
                            "hscan" : { "minimum" : 0.2857, "maximum" : 0.3214 },
                            "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
                    },
                    {
                            "index" : 64,
                            "hscan" : { "minimum" : 0.2500, "maximum" : 0.2857 },
                            "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
                    },
                    {
                            "index" : 65,
                            "hscan" : { "minimum" : 0.2143, "maximum" : 0.2500 },
                            "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
                    },
                    {
                            "index" : 66,
                            "hscan" : { "minimum" : 0.1786, "maximum" : 0.2143 },
                            "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
                    },
                    {
                            "index" : 67,
                            "hscan" : { "minimum" : 0.1429, "maximum" : 0.1786 },
                            "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
                    },
                    {
                            "index" : 68,
                            "hscan" : { "minimum" : 0.1071, "maximum" : 0.1429 },
                            "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
                    },
                    {
                            "index" : 69,
                            "hscan" : { "minimum" : 0.0714, "maximum" : 0.1071 },
                            "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
                    },
                    {
                            "index" : 70,
                            "hscan" : { "minimum" : 0.0357, "maximum" : 0.0714 },
                            "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
                    },
                    {
                            "index" : 71,
                            "hscan" : { "minimum" : 0.0000, "maximum" : 0.0357 },
                            "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
                    },
                    {
                            "index" : 72,
                            "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 },
                            "vscan" : { "minimum" : 0.0000, "maximum" : 0.0625 }
                    },
                    {
                            "index" : 73,
                            "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 },
                            "vscan" : { "minimum" : 0.0625, "maximum" : 0.1250 }
                    },
                    {
                            "index" : 74,
                            "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 },
                            "vscan" : { "minimum" : 0.1250, "maximum" : 0.1875 }
                    },
                    {
                            "index" : 75,
                            "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 },
                            "vscan" : { "minimum" : 0.1875, "maximum" : 0.2500 }
                    },
                    {
                            "index" : 76,
                            "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 },
                            "vscan" : { "minimum" : 0.2500, "maximum" : 0.3125 }
                    },
                    {
                            "index" : 77,
                            "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 },
                            "vscan" : { "minimum" : 0.3125, "maximum" : 0.3750 }
                    },
                    {
                            "index" : 78,
                            "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 },
                            "vscan" : { "minimum" : 0.3750, "maximum" : 0.4375 }
                    },
                    {
                            "index" : 79,
                            "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 },
                            "vscan" : { "minimum" : 0.4375, "maximum" : 0.5000 }
                    },
                    {
                            "index" : 80,
                            "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 },
                            "vscan" : { "minimum" : 0.5000, "maximum" : 0.5625 }
                    },
                    {
                            "index" : 81,
                            "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 },
                            "vscan" : { "minimum" : 0.5625, "maximum" : 0.6250 }
                    },
                    {
                            "index" : 82,
                            "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 },
                            "vscan" : { "minimum" : 0.6250, "maximum" : 0.6875 }
                    },
                    {
                            "index" : 83,
                            "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 },
                            "vscan" : { "minimum" : 0.6875, "maximum" : 0.7500 }
                    },
                    {
                            "index" : 84,
                            "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 },
                            "vscan" : { "minimum" : 0.7500, "maximum" : 0.8125 }
                    },
                    {
                            "index" : 85,
                            "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 },
                            "vscan" : { "minimum" : 0.8125, "maximum" : 0.8750 }
                    },
                    {
                            "index" : 86,
                            "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 },
                            "vscan" : { "minimum" : 0.8750, "maximum" : 0.9375 }
                    },
                    {
                            "index" : 87,
                            "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 },
                            "vscan" : { "minimum" : 0.9375, "maximum" : 1.0000 }
                    }
            ],
    
            "endOfJson" : "endOfJson"
    }
    
     
  9. Paulchen-Panther

    Paulchen-Panther Active Member Developer

    Messages:
    208
    log from hyperion please!
     
  10. Bob M

    Bob M New Member

    Messages:
    14
    Hardware:
    RPi3
    Sure:

    Code:
    ssh in:     -- Logs begin at Thu 2016-11-03 17:16:42 GMT, end at Thu 2019-07-04 18:34:30 BST. --
    ssh in:     Jul 04 17:14:46 raspberrypi systemd[1]: Started Hyperion Systemd service.
    ssh in:     Jul 04 17:14:47 raspberrypi hyperiond[323]: Hyperion Ambilight Deamon (323)
    ssh in:     Jul 04 17:14:47 raspberrypi hyperiond[323]:         Version   : V1.03.4 (brindosch-c750c41/dc6a602-1522918225
    ssh in:     Jul 04 17:14:47 raspberrypi hyperiond[323]:         Build Time: Apr  5 2018 01:57:25
    ssh in:     Jul 04 17:14:48 raspberrypi hyperiond[323]: INFO: Selected configuration file: /etc/hyperion/hyperion.config.json
    ssh in:     Jul 04 17:14:48 raspberrypi hyperiond[323]: HYPERION INFO: ColorTransform 'default' => [0; 87]
    ssh in:     Jul 04 17:14:48 raspberrypi hyperiond[323]: HYPERION INFO: ColorCorrection 'default' => [0; 87]
    ssh in:     Jul 04 17:14:48 raspberrypi hyperiond[323]: HYPERION INFO: ColorAdjustment 'default' => [0; 87]
    ssh in:     Jul 04 17:14:48 raspberrypi hyperiond[323]: LEDDEVICE INFO: configuration:
    ssh in:     Jul 04 17:14:48 raspberrypi hyperiond[323]: {
    ssh in:     Jul 04 17:14:48 raspberrypi hyperiond[323]:         "colorOrder" : "rgb",
    ssh in:     Jul 04 17:14:48 raspberrypi hyperiond[323]:         "delayAfterConnect" : 1500,
    ssh in:     Jul 04 17:14:48 raspberrypi hyperiond[323]:         "name" : "MyHyperionConfig",
    ssh in:     Jul 04 17:14:48 raspberrypi hyperiond[323]:         "output" : "/dev/ttyUSB0",
    ssh in:     Jul 04 17:14:48 raspberrypi hyperiond[323]:         "rate" : 115200,
    ssh in:     Jul 04 17:14:48 raspberrypi hyperiond[323]:         "type" : "adalight"
    ssh in:     Jul 04 17:14:48 raspberrypi hyperiond[323]: }
    ssh in:     Jul 04 17:14:48 raspberrypi hyperiond[323]: Opening UART: /dev/ttyUSB0
    ssh in:     Jul 04 17:14:48 raspberrypi hyperiond[323]: Device blocked for 1500 ms
    ssh in:     Jul 04 17:14:48 raspberrypi hyperiond[323]: INFO: Creating linear smoothing
    ssh in:     Jul 04 17:14:48 raspberrypi hyperiond[323]: HYPERION (CS) INFO: Created linear-smoothing(interval_ms=50;settlingTime_ms=200;updateDelay=0
    ssh in:     Jul 04 17:14:48 raspberrypi hyperiond[323]: EFFECTENGINE INFO: 27 effects loaded from directory /usr/share/hyperion/effects
    ssh in:     Jul 04 17:14:48 raspberrypi hyperiond[323]: EFFECTENGINE INFO: Initializing Python interpreter
    ssh in:     Jul 04 17:14:48 raspberrypi hyperiond[323]: INFO: Hyperion started and initialised
    ssh in:     Jul 04 17:14:48 raspberrypi hyperiond[323]: INFO: Boot sequence 'Rainbow swirl fast' EFFECTENGINE INFO: run effect Rainbow swirl fast on channel 0
    ssh in:     Jul 04 17:14:48 raspberrypi hyperiond[323]: BLACKBORDER INFO: threshold set to 0 (0)
    ssh in:     Jul 04 17:14:48 raspberrypi hyperiond[323]: BLACKBORDER INFO: mode:default
    ssh in:     Jul 04 17:14:48 raspberrypi hyperiond[323]: started
    ssh in:     Jul 04 17:14:48 raspberrypi hyperiond[323]: INFO: Json server created and started on port 19444
    ssh in:     Jul 04 17:14:48 raspberrypi hyperiond[323]: INFO: Proto server created and started on port 19445
    ssh in:     Jul 04 17:14:48 raspberrypi hyperiond[323]: V4L2GRABBER INFO: width=720 height=480
    ssh in:     Jul 04 17:14:48 raspberrypi hyperiond[323]: V4L2GRABBER INFO: pixel format=YUYV
    ssh in:     Jul 04 17:14:48 raspberrypi hyperiond[323]: BLACKBORDER INFO: threshold set to 0 (0)
    ssh in:     Jul 04 17:14:48 raspberrypi hyperiond[323]: BLACKBORDER INFO: mode:default
    ssh in:     Jul 04 17:14:48 raspberrypi hyperiond[323]: V4L2GRABBER INFO: signal threshold set to: {0,0,0}
    ssh in:     Jul 04 17:14:48 raspberrypi hyperiond[323]: V4L2GRABBER INFO: started
    ssh in:     Jul 04 17:14:48 raspberrypi hyperiond[323]: INFO: V4L2 grabber created and started
    ssh in:     Jul 04 17:14:48 raspberrypi hyperiond[323]: BORDER SWITCH REQUIRED!!
    ssh in:     Jul 04 17:14:48 raspberrypi hyperiond[323]: CURRENT BORDER TYPE: unknown=0 hor.size=0 vert.size=0
    ssh in:     Jul 04 17:14:49 raspberrypi hyperiond[323]: V4L2GRABBER INFO: stopped
    ssh in:     Jul 04 17:14:49 raspberrypi hyperiond[323]: Device unblocked
    ssh in:     Jul 04 17:14:51 raspberrypi hyperiond[323]: EFFECTENGINE INFO: effect finished
    ssh in:     Jul 04 17:14:52 raspberrypi hyperiond[323]: V4L2GRABBER INFO: started
    
    Hyperion seem quite happy, and I'm assuming the flashing LED on the Arduino represents some kind of comms.
     
  11. Paulchen-Panther

    Paulchen-Panther Active Member Developer

    Messages:
    208
    Is it just a flashing of the leds? What happens if you start the arduino without usb cable?
    Have you ever tried a higher baudrate?
     
  12. Bob M

    Bob M New Member

    Messages:
    14
    Hardware:
    RPi3
    Yes - the LEDs just flash through the "initial RGB flash" that's defined in the sketch - once when the Arduino boots and again when Hyperion starts up (and every time I stop-and-start Hyperion from Hypercon).
    I've tried 460800, 100000 and 500000 baud.
    The USB cable is the only power source for the Arduino so it doesn't do much without it... are you thinking that it needs more power? When I rand the striptest sketch from the FastLED library it worked ok with just USB power.
    (thanks for your help by the way!)
     
  13. Paulchen-Panther

    Paulchen-Panther Active Member Developer

    Messages:
    208
    No, that's not what I meant. Do you see the initial color test of the arduino sketch? (without hyperion)

    Code:
    #define INITIAL_LED_TEST_ENABLED true
    #define INITIAL_LED_TEST_BRIGHTNESS 32  // 0..255 <---- please set to 255 for full white
    #define INITIAL_LED_TEST_TIME_MS 500  // 10..     <----- please set to 5000 for 5 seconds
     
  14. Bob M

    Bob M New Member

    Messages:
    14
    Hardware:
    RPi3
    Yes. To clarify - the only LED activity I see is the initial test that the sketch performs. I see it when the Arduino powers up and also whenever Hyperion starts. Specifically I've *not* been talking about Hyperion's colour swirl, just the initial double-flash that the sketch performs.
    ie. the only effect that Hyperion is having at all is that when it starts it seems to restart the sketch on the Arduino; I see no actual LED activity that's being controlled by Hyperion at all.

    I've now unplugged the Arduino from the Pi and have provided it with power only - and again I see the double-flash as soon as it starts up.
     
    Last edited: 4 July 2019
  15. Paulchen-Panther

    Paulchen-Panther Active Member Developer

    Messages:
    208
    Please double check the hardware pin numbers for DATA_PIN (6) and CLOCK_PIN (4)

    Code:
    // For 3 wire led stripes line Neopixel/Ws2812, 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), both defines DATA_PIN and CLOCK_PIN are needed
    
    // DATA_PIN, or DATA_PIN, CLOCK_PIN
    //#define LED_PINS 6        // 3 wire leds
    #define LED_PINS 6, 4  // 4 wire leds
    Then comment the checksum conditional statement and flash again the arduino.

    Code:
        // Hi, Lo, Checksum
        if (!checkIncommingData()) continue;
        hi = Serial.read();
        if (!checkIncommingData()) continue;
        lo = Serial.read();
        if (!checkIncommingData()) continue;
        chk = Serial.read();
    
        // if checksum does not match go back to wait
    //    if (chk != (hi ^ lo ^ 0x55)) continue;         <----- HERE
    
        memset(leds, 0, MAX_LEDS * sizeof(struct CRGB));
        transmissionSuccess = true;
        sum_r = 0;
        sum_g = 0;
        sum_b = 0;
    This problem seems to have nothing to do with Hyperion if the arduino does not already show the startup effect.
    In case of doubt, I would look for another sketch on the internet.
     
  16. Bob M

    Bob M New Member

    Messages:
    14
    Hardware:
    RPi3
    The pins are definitely correct - data to pin 6, clock to pin 4.

    When you've said "the startup effect" you're talking about this, right?
    Code:
     // initial RGB flash
      #if INITIAL_LED_TEST_ENABLED == true
      for (int v=0;v<INITIAL_LED_TEST_BRIGHTNESS;v++)
      {
        showColor(CRGB(v,v,v));
        delay(INITIAL_LED_TEST_TIME_MS/2/INITIAL_LED_TEST_BRIGHTNESS);
      }
      for (int v=0;v<INITIAL_LED_TEST_BRIGHTNESS;v++)
      {
        showColor(CRGB(v,v,v));
        delay(INITIAL_LED_TEST_TIME_MS/2/INITIAL_LED_TEST_BRIGHTNESS);
      }
      #endif
    If so then I must be not making myself clear. I *am* seeing this effect - once when the Arduino gets powered and again any time that Hyperion is started.

    I've edited the sketch to comment out the checksum line and have uploaded it - the behaviour is still exactly as it was before.

    I've also tried this sketch:
    Code:
    #include "FastLED.h"
    
    // How many leds in your strip?
    #define NUM_LEDS 88
    
    // 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 CLOCK_PIN 4
    
    #define COLOR_ORDER RGB
    
    // 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();
    }
    
    ....which had it's own startup effect (red/green/blue cycle), and again I only saw that effect and then nothing from Hyperion.
     
    Last edited: 4 July 2019
  17. Akriss

    Akriss Active Member

    Messages:
    495
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
  18. Bob M

    Bob M New Member

    Messages:
    14
    Hardware:
    RPi3
    Hi Akriss
    Thanks - I've already run this exact sketch on my Arduino - it worked like a charm (it was what I ran in post #7 above when I first bought the Arduino to test that the LEDs were still working).
    I'm 100% confident that the Arduino and the LEDs are working perfectly, the problem seems to be getting the Pi/Hyperion to talk to the Arduino.
     
  19. Akriss

    Akriss Active Member

    Messages:
    495
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    Rereading top to bottom. And I'm leaning to a power supply fault.

    I've had power supply that over time the amperage output drops drastically.

    This worries me. (The cable length)
    As voltage drop could be a issue on long runs. And could push the power supply over the limits.

    Maybe.
    Just a thought.
     
  20. Bob M

    Bob M New Member

    Messages:
    14
    Hardware:
    RPi3
    I see the same behavior if I remove the extra cabling, and in either case I've checked the voltage at the end of the LED strip with a multimeter - it's not a voltage issue.
    Think the next step is to plug the USB output into a terminal emulator and see exactly what the Pi/Hyperion are sending down the wire.