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

SOLVED ws2812b + Arduino mega no communication

Discussion in 'Hardware Support' started by Digiwill, 23 January 2019.

  1. Digiwill

    Digiwill New Member

    Messages:
    9
    Hardware:
    RPi3, +Arduino
    Hello, I'm working to add a strip of ws2812b leds under on the top of my arcade. I've been playing with Arduino adalight sketch and hypercon for a while but I can't seem to make them talk to each other.

    My hardware is a Rpi 3 b and Arduino mega connected to ws2812b lights, I only have 20 lights set up along the top of the screen from left to right

    When I start up the Arduino the LED do two test flashes so I'm pretty sure my wires are set up correctly, my problem is that once they flash they turn off and never respond to the Hyperion program. My logs say I'm connected and that everything is running from hypercon.

    Here is the Arduino ino file I'm using
    1. #include "FastLED.h"

    2. #define ANALOG_MODE_AVERAGE 0
    3. #define ANALOG_MODE_LAST_LED 1

    4. /**************************************
    5. S E T U P

    6. set following values to your needs
    7. **************************************/

    8. #define INITIAL_LED_TEST_ENABLED true
    9. #define INITIAL_LED_TEST_BRIGHTNESS 255 // 0..255
    10. #define INITIAL_LED_TEST_TIME_MS 500 // 10..

    11. // Number of leds in your strip. set to "1" and ANALOG_OUTPUT_ENABLED to "true" to activate analog only
    12. // As of 26/1/2017:
    13. // 582 leaves ZERO bytes free and this
    14. // 410 is ok
    15. // tested with 500 leds and is fine (despite the warning)
    16. #define MAX_LEDS 20

    17. // type of your led controller, possible values, see below
    18. #define LED_TYPE WS2812B

    19. // 3 wire (pwm): NEOPIXEL BTM1829 TM1812 TM1809 TM1804 TM1803 UCS1903 UCS1903B UCS1904 UCS2903 WS2812 WS2852
    20. // S2812B SK6812 SK6822 APA106 PL9823 WS2811 WS2813 APA104 WS2811_40 GW6205 GW6205_40 LPD1886 LPD1886_8BIT
    21. // 4 wire (spi): LPD8806 WS2801 WS2803 SM16716 P9813 APA102 SK9822 DOTSTAR

    22. // For 3 wire led stripes line Neopixel/Ws2812, which have a data line, ground, and power, you just need to define DATA_PIN.
    23. // For led chipsets that are SPI based (four wires - data, clock, ground, and power), both defines DATA_PIN and CLOCK_PIN are needed

    24. // DATA_PIN, or DATA_PIN, CLOCK_PIN
    25. #define LED_PINS 6 // 3 wire leds
    26. //#define LED_PINS 6, 13 // 4 wire leds

    27. #define COLOR_ORDER RGB // colororder of the stripe, set RGB in hyperion

    28. #define OFF_TIMEOUT 15000 // ms to switch off after no data was received, set 0 to deactivate

    29. // analog rgb uni color led stripe - using of hyperion smoothing is recommended
    30. // ATTENTION this pin config is default for atmega328 based arduinos, others might work to
    31. // if you have flickering analog leds this might be caused by unsynced pwm signals
    32. // try other pins is more or less the only thing that helps
    33. #define ANALOG_OUTPUT_ENABLED false
    34. #define ANALOG_MODE ANALOG_MODE_LAST_LED // use ANALOG_MODE_AVERAGE or ANALOG_MODE_LAST_LED
    35. #define ANALOG_GROUND_PIN 8 // additional ground pin to make wiring a bit easier
    36. #define ANALOG_RED_PIN 9
    37. #define ANALOG_GREEN_PIN 10
    38. #define ANALOG_BLUE_PIN 11

    39. // overall color adjustments
    40. #define ANALOG_BRIGHTNESS_RED 255 // maximum brightness for analog 0-255
    41. #define ANALOG_BRIGHTNESS_GREEN 255 // maximum brightness for analog 0-255
    42. #define ANALOG_BRIGHTNESS_BLUE 255 // maximum brightness for analog 0-255

    43. #define BRIGHTNESS 255 // maximum brightness 0-255
    44. #define DITHER_MODE BINARY_DITHER // BINARY_DITHER or DISABLE_DITHER
    45. #define COLOR_TEMPERATURE CRGB(255,255,255) // RGB value describing the color temperature
    46. #define COLOR_CORRECTION TypicalLEDStrip // predefined fastled color correction
    47. //#define COLOR_CORRECTION CRGB(255,255,255) // or RGB value describing the color correction

    48. // Baudrate, higher rate allows faster refresh rate and more LEDs
    49. //#define serialRate 460800 // use 115200 for ftdi based boards
    50. #define serialRate 115200 // use 115200 for ftdi based boards
    51. //#define serialRate 500000 // use 115200 for ftdi based boards


    52. /**************************************
    53. A D A L I G H T C O D E

    54. no user changes needed
    55. **************************************/

    56. // Adalight sends a "Magic Word" (defined in /etc/boblight.conf) before sending the pixel data
    57. uint8_t prefix[] = {'A', 'd', 'a'}, hi, lo, chk, i;

    58. unsigned long endTime;

    59. // Define the array of leds
    60. CRGB leds[MAX_LEDS];

    61. // set rgb to analog led stripe
    62. void showAnalogRGB(const CRGB& led) {
    63. if (ANALOG_OUTPUT_ENABLED) {
    64. byte r = map(led.r, 0,255,0,ANALOG_BRIGHTNESS_RED);
    65. byte g = map(led.g, 0,255,0,ANALOG_BRIGHTNESS_GREEN);
    66. byte b = map(led.b, 0,255,0,ANALOG_BRIGHTNESS_BLUE);
    67. analogWrite(ANALOG_RED_PIN , r);
    68. analogWrite(ANALOG_GREEN_PIN, g);
    69. analogWrite(ANALOG_BLUE_PIN , b);
    70. }
    71. }

    72. // set color to all leds
    73. void showColor(const CRGB& led) {
    74. #if MAX_LEDS > 1 || ANALOG_OUTPUT_ENABLED == false
    75. LEDS.showColor(led);
    76. #endif
    77. showAnalogRGB(led);
    78. }

    79. // switch of digital and analog leds
    80. void switchOff() {
    81. #if MAX_LEDS > 1 || ANALOG_OUTPUT_ENABLED == false
    82. memset(leds, 0, MAX_LEDS * sizeof(struct CRGB));
    83. FastLED.show();
    84. #endif
    85. showAnalogRGB(leds[0]);
    86. }

    87. // function to check if serial data is available
    88. // if timeout occured leds switch of, if configured
    89. bool checkIncommingData() {
    90. boolean dataAvailable = true;
    91. while (!Serial.available()) {
    92. if ( OFF_TIMEOUT > 0 && endTime < millis()) {
    93. switchOff();
    94. dataAvailable = false;
    95. endTime = millis() + OFF_TIMEOUT;
    96. }
    97. }

    98. return dataAvailable;
    99. }

    100. // main function that setups and runs the code
    101. void setup() {
    102. Serial.begin(serialRate);

    103. // analog output
    104. if (ANALOG_OUTPUT_ENABLED) {
    105. // additional ground pin to make wiring a bit easier
    106. pinMode(ANALOG_GROUND_PIN, OUTPUT);
    107. digitalWrite(ANALOG_GROUND_PIN, LOW);
    108. pinMode(ANALOG_BLUE_PIN , OUTPUT);
    109. pinMode(ANALOG_RED_PIN , OUTPUT);
    110. pinMode(ANALOG_GREEN_PIN, OUTPUT);
    111. }

    112. int ledCount = MAX_LEDS;
    113. if (ANALOG_MODE == ANALOG_MODE_LAST_LED) {
    114. ledCount--;
    115. }

    116. #if MAX_LEDS > 1 || ANALOG_OUTPUT_ENABLED == false
    117. FastLED.addLeds<LED_TYPE, LED_PINS, COLOR_ORDER>(leds, ledCount);
    118. #endif
    119. // color adjustments
    120. FastLED.setBrightness ( BRIGHTNESS );
    121. FastLED.setTemperature( COLOR_TEMPERATURE );
    122. FastLED.setCorrection ( COLOR_CORRECTION );
    123. FastLED.setDither ( DITHER_MODE );

    124. // initial RGB flash
    125. #if INITIAL_LED_TEST_ENABLED == true
    126. for (int v=0;v<INITIAL_LED_TEST_BRIGHTNESS;v++)
    127. {
    128. showColor(CRGB(v,v,v));
    129. delay(INITIAL_LED_TEST_TIME_MS/2/INITIAL_LED_TEST_BRIGHTNESS);
    130. }

    131. for (int v=0;v<INITIAL_LED_TEST_BRIGHTNESS;v++)
    132. {
    133. showColor(CRGB(v,v,v));
    134. delay(INITIAL_LED_TEST_TIME_MS/2/INITIAL_LED_TEST_BRIGHTNESS);
    135. }
    136. #endif
    137. showColor(CRGB(0, 0, 0));

    138. Serial.print("Ada\n"); // Send "Magic Word" string to host


    139. boolean transmissionSuccess;
    140. unsigned long sum_r, sum_g, sum_b;

    141. // loop() is avoided as even that small bit of function overhead
    142. // has a measurable impact on this code's overall throughput.
    143. for(;;) {
    144. // wait for first byte of Magic Word
    145. for (i = 0; i < sizeof prefix; ++i) {
    146. // If next byte is not in Magic Word, the start over
    147. if (!checkIncommingData() || prefix != 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.
      [*]}



    and here are my config files
    // 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" : 115200,
    "delayAfterConnect" : 0,
    "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" : 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" : 200,
    "updateFrequency" : 20.0000,
    "updateDelay" : 0
    }
    },
    // NO V4L2 GRABBER CONFIG
    // FRAME GRABBER CONFIG
    "framegrabber" :
    {
    "width" : 64,
    "height" : 64,
    "frequency_Hz" : 10.0,
    "priority" : 890
    },
    // 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 KODI CHECK CONFIG
    // NO BOBLIGHT SERVER CONFIG
    // NO JSON/PROTO FORWARD CONFIG
    // LED CONFIGURATION
    "leds" :
    [
    {
    "index" : 0,
    "hscan" : { "minimum" : 0.9500, "maximum" : 1.0000 },
    "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
    },
    {
    "index" : 1,
    "hscan" : { "minimum" : 0.9000, "maximum" : 0.9500 },
    "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
    },
    {
    "index" : 2,
    "hscan" : { "minimum" : 0.8500, "maximum" : 0.9000 },
    "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
    },
    {
    "index" : 3,
    "hscan" : { "minimum" : 0.8000, "maximum" : 0.8500 },
    "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
    },
    {
    "index" : 4,
    "hscan" : { "minimum" : 0.7500, "maximum" : 0.8000 },
    "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
    },
    {
    "index" : 5,
    "hscan" : { "minimum" : 0.7000, "maximum" : 0.7500 },
    "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
    },
    {
    "index" : 6,
    "hscan" : { "minimum" : 0.6500, "maximum" : 0.7000 },
    "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
    },
    {
    "index" : 7,
    "hscan" : { "minimum" : 0.6000, "maximum" : 0.6500 },
    "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
    },
    {
    "index" : 8,
    "hscan" : { "minimum" : 0.5500, "maximum" : 0.6000 },
    "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
    },
    {
    "index" : 9,
    "hscan" : { "minimum" : 0.5000, "maximum" : 0.5500 },
    "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
    },
    {
    "index" : 10,
    "hscan" : { "minimum" : 0.4500, "maximum" : 0.5000 },
    "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
    },
    {
    "index" : 11,
    "hscan" : { "minimum" : 0.4000, "maximum" : 0.4500 },
    "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
    },
    {
    "index" : 12,
    "hscan" : { "minimum" : 0.3500, "maximum" : 0.4000 },
    "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
    },
    {
    "index" : 13,
    "hscan" : { "minimum" : 0.3000, "maximum" : 0.3500 },
    "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
    },
    {
    "index" : 14,
    "hscan" : { "minimum" : 0.2500, "maximum" : 0.3000 },
    "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
    },
    {
    "index" : 15,
    "hscan" : { "minimum" : 0.2000, "maximum" : 0.2500 },
    "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
    },
    {
    "index" : 16,
    "hscan" : { "minimum" : 0.1500, "maximum" : 0.2000 },
    "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
    },
    {
    "index" : 17,
    "hscan" : { "minimum" : 0.1000, "maximum" : 0.1500 },
    "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
    },
    {
    "index" : 18,
    "hscan" : { "minimum" : 0.0500, "maximum" : 0.1000 },
    "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
    },
    {
    "index" : 19,
    "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 },
    "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
    }
    ],
    "endOfJson" : "endOfJson"
    }


    Sorry for not using pastebin I couldn't figure out how to get it to work.
    Thanks for the help!
     
  2. Paulchen-Panther

    Paulchen-Panther Active Member Developer

    Messages:
    196
    can you post the log from hypercon in ssh tab?
     
  3. Digiwill

    Digiwill New Member

    Messages:
    9
    Hardware:
    RPi3, +Arduino
    Sure, thanks for the reply

    SSH Traffic:
    ssh connected
    ssh out: sudo systemctl stop hyperion.service 2>/dev/null; sudo /etc/init.d/hyperion stop 2>/dev/null ; sudo /sbin/initctl stop hyperion 2>/dev/null
    ssh out: sudo systemctl start hyperion.service 2>/dev/null ; sudo /etc/init.d/hyperion start 2>/dev/null ; sudo /sbin/initctl start hyperion 2>/dev/null
    ssh out: sudo journalctl -u hyperion.service 2>/dev/null
    ssh in: -- Logs begin at Wed 2019-01-23 15:17:01 UTC, end at Wed 2019-01-23 19:37:51 UTC. --
    ssh in: Jan 23 15:17:03 retropie systemd[1]: Starting Hyperion Systemd service...
    ssh in: Jan 23 15:17:03 retropie systemd[1]: Started Hyperion Systemd service.
    ssh in: Jan 23 15:17:04 retropie hyperiond[452]: Hyperion Ambilight Deamon (452)
    ssh in: Jan 23 15:17:04 retropie hyperiond[452]: Version : V1.03.4 (brindosch-c750c41/dc6a602-1522918225
    ssh in: Jan 23 15:17:04 retropie hyperiond[452]: Build Time: Apr 5 2018 01:57:25
    ssh in: Jan 23 15:17:04 retropie hyperiond[452]: INFO: Selected configuration file: /etc/hyperion/hyperion.config.json
    ssh in: Jan 23 15:17:04 retropie hyperiond[452]: HYPERION INFO: ColorTransform 'default' => [0; 19]
    ssh in: Jan 23 15:17:04 retropie hyperiond[452]: HYPERION INFO: ColorCorrection 'default' => [0; 19]
    ssh in: Jan 23 15:17:04 retropie hyperiond[452]: HYPERION INFO: ColorAdjustment 'default' => [0; 19]
    ssh in: Jan 23 15:17:04 retropie hyperiond[452]: LEDDEVICE INFO: configuration:
    ssh in: Jan 23 15:17:04 retropie hyperiond[452]: {
    ssh in: Jan 23 15:17:04 retropie hyperiond[452]: "colorOrder" : "rgb",
    ssh in: Jan 23 15:17:04 retropie hyperiond[452]: "delayAfterConnect" : 0,
    ssh in: Jan 23 15:17:04 retropie hyperiond[452]: "name" : "MyHyperionConfig",
    ssh in: Jan 23 15:17:04 retropie hyperiond[452]: "output" : "/dev/ttyACM0",
    ssh in: Jan 23 15:17:04 retropie hyperiond[452]: "rate" : 10000,
    ssh in: Jan 23 15:17:04 retropie hyperiond[452]: "type" : "adalight"
    ssh in: Jan 23 15:17:05 retropie hyperiond[452]: }
    ssh in: Jan 23 15:17:05 retropie hyperiond[452]: Opening UART: /dev/ttyACM0
    ssh in: Jan 23 15:17:05 retropie hyperiond[452]: INFO: Creating linear smoothing
    ssh in: Jan 23 15:17:05 retropie hyperiond[452]: HYPERION (CS) INFO: Created linear-smoothing(interval_ms=50;settlingTime_ms=200;updateDelay=0
    ssh in: Jan 23 15:17:05 retropie hyperiond[452]: EFFECTENGINE INFO: 27 effects loaded from directory /usr/share/hyperion/effects
    ssh in: Jan 23 15:17:05 retropie hyperiond[452]: EFFECTENGINE INFO: Initializing Python interpreter
    ssh in: Jan 23 15:17:05 retropie hyperiond[452]: INFO: Hyperion started and initialised
    ssh in: Jan 23 15:17:05 retropie hyperiond[452]: INFO: Boot sequence 'Rainbow swirl fast' EFFECTENGINE INFO: run effect Rainbow swirl fast on channel 0
    ssh in: Jan 23 15:17:05 retropie hyperiond[452]: BLACKBORDER INFO: threshold set to 0 (0)
    ssh in: Jan 23 15:17:05 retropie hyperiond[452]: BLACKBORDER INFO: mode:default
    ssh in: Jan 23 15:17:05 retropie hyperiond[452]: started
    ssh in: Jan 23 15:17:05 retropie hyperiond[452]: INFO: Json server created and started on port 19444
    ssh in: Jan 23 15:17:05 retropie hyperiond[452]: INFO: Proto server created and started on port 19445
    ssh in: Jan 23 15:17:05 retropie hyperiond[452]: DISPMANXGRABBER INFO: Display opened with resolution: 1360x768
    ssh in: Jan 23 15:17:05 retropie hyperiond[452]: BLACKBORDER INFO: threshold set to 0 (0)
    ssh in: Jan 23 15:17:05 retropie hyperiond[452]: BLACKBORDER INFO: mode:default
    ssh in: Jan 23 15:17:05 retropie hyperiond[452]: INFO: Frame grabber created and started
    ssh in: Jan 23 15:17:05 retropie hyperiond[452]: BORDER SWITCH REQUIRED!!
    ssh in: Jan 23 15:17:05 retropie hyperiond[452]: CURRENT BORDER TYPE: unknown=0 hor.size=0 vert.size=0
    ssh in: Jan 23 15:17:08 retropie hyperiond[452]: EFFECTENGINE INFO: effect finished
    ssh in: Jan 23 19:37:48 retropie systemd[1]: Stopping Hyperion Systemd service...
    ssh in: Jan 23 19:37:48 retropie hyperiond[452]: INFO: Application closed with code 0


    This was the startup and then me stopping the service from hypercon
     
  4. Akriss

    Akriss Active Member

    Messages:
    491
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    That differs from what you have in your previously posted configs. They have ""rate" : 115200,". Which is correct. As it matches the sketch's rate.

    Hope it helps.
     
  5. Digiwill

    Digiwill New Member

    Messages:
    9
    Hardware:
    RPi3, +Arduino
    Sorry I had been playing around with that value and forgot to set it back to default.

    Updated logs still nothing from the lights tho. If it's of any help my "rx" light on the mega is flashing rapidity when plugged into the pi after boot up.
    I get the two flashes from the ino sketch but no rainbow effect. Thanks for taking a look again.

    ssh in: Jan 23 23:07:08 retropie hyperiond[940]: EFFECTENGINE INFO: effect finished
    ssh in: Jan 23 23:07:35 retropie systemd[1]: Started Hyperion Systemd service.
    ssh in: Jan 23 23:07:56 retropie systemd[1]: Stopping Hyperion Systemd service...
    ssh in: Jan 23 23:07:56 retropie hyperiond[940]: INFO: Application closed with code 0
    ssh in: Jan 23 23:07:56 retropie hyperiond[940]: EFFECTENGINE INFO: Cleaning up Python interpreter
    ssh in: Jan 23 23:07:56 retropie systemd[1]: Stopped Hyperion Systemd service.
    ssh in: Jan 23 23:07:57 retropie systemd[1]: Starting Hyperion Systemd service...
    ssh in: Jan 23 23:07:57 retropie systemd[1]: Started Hyperion Systemd service.
    ssh in: Jan 23 23:07:57 retropie hyperiond[1006]: Hyperion Ambilight Deamon (1006)
    ssh in: Jan 23 23:07:57 retropie hyperiond[1006]: Version : V1.03.4 (brindosch-c750c41/dc6a602-1522918225
    ssh in: Jan 23 23:07:57 retropie hyperiond[1006]: Build Time: Apr 5 2018 01:57:25
    ssh in: Jan 23 23:07:57 retropie hyperiond[1006]: INFO: Selected configuration file: /etc/hyperion/hyperion.config.json
    ssh in: Jan 23 23:07:57 retropie hyperiond[1006]: HYPERION INFO: ColorTransform 'default' => [0; 19]
    ssh in: Jan 23 23:07:57 retropie hyperiond[1006]: HYPERION INFO: ColorCorrection 'default' => [0; 19]
    ssh in: Jan 23 23:07:57 retropie hyperiond[1006]: HYPERION INFO: ColorAdjustment 'default' => [0; 19]
    ssh in: Jan 23 23:07:57 retropie hyperiond[1006]: LEDDEVICE INFO: configuration:
    ssh in: Jan 23 23:07:57 retropie hyperiond[1006]: {
    ssh in: Jan 23 23:07:57 retropie hyperiond[1006]: "colorOrder" : "rgb",
    ssh in: Jan 23 23:07:57 retropie hyperiond[1006]: "delayAfterConnect" : 0,
    ssh in: Jan 23 23:07:57 retropie hyperiond[1006]: "name" : "MyHyperionConfig",
    ssh in: Jan 23 23:07:57 retropie hyperiond[1006]: "output" : "/dev/ttyACM0",
    ssh in: Jan 23 23:07:57 retropie hyperiond[1006]: "rate" : 115200,
    ssh in: Jan 23 23:07:57 retropie hyperiond[1006]: "type" : "adalight"
    ssh in: Jan 23 23:07:57 retropie hyperiond[1006]: }
    ssh in: Jan 23 23:07:57 retropie hyperiond[1006]: Opening UART: /dev/ttyACM0
    ssh in: Jan 23 23:07:57 retropie hyperiond[1006]: INFO: Creating linear smoothing
    ssh in: Jan 23 23:07:57 retropie hyperiond[1006]: HYPERION (CS) INFO: Created linear-smoothing(interval_ms=50;settlingTime_ms=200;updateDelay=0
    ssh in: Jan 23 23:07:57 retropie hyperiond[1006]: EFFECTENGINE INFO: 27 effects loaded from directory /usr/share/hyperion/effects
    ssh in: Jan 23 23:07:57 retropie hyperiond[1006]: EFFECTENGINE INFO: Initializing Python interpreter
    ssh in: Jan 23 23:07:57 retropie hyperiond[1006]: INFO: Hyperion started and initialised
    ssh in: Jan 23 23:07:57 retropie hyperiond[1006]: INFO: Boot sequence 'Rainbow swirl fast' EFFECTENGINE INFO: run effect Rainbow swirl fast on channel 0
    ssh in: Jan 23 23:07:57 retropie hyperiond[1006]: BLACKBORDER INFO: threshold set to 0 (0)
    ssh in: Jan 23 23:07:57 retropie hyperiond[1006]: BLACKBORDER INFO: mode:default
    ssh in: Jan 23 23:07:57 retropie hyperiond[1006]: started
    ssh in: Jan 23 23:07:57 retropie hyperiond[1006]: INFO: Json server created and started on port 19444
    ssh in: Jan 23 23:07:57 retropie hyperiond[1006]: INFO: Proto server created and started on port 19445
    ssh in: Jan 23 23:07:57 retropie hyperiond[1006]: DISPMANXGRABBER INFO: Display opened with resolution: 1360x768
    ssh in: Jan 23 23:07:57 retropie hyperiond[1006]: BLACKBORDER INFO: threshold set to 0 (0)
    ssh in: Jan 23 23:07:57 retropie hyperiond[1006]: BLACKBORDER INFO: mode:default
    ssh in: Jan 23 23:07:57 retropie hyperiond[1006]: INFO: Frame grabber created and started
    ssh in: Jan 23 23:07:57 retropie hyperiond[1006]: BORDER SWITCH REQUIRED!!
    ssh in: Jan 23 23:07:57 retropie hyperiond[1006]: CURRENT BORDER TYPE: unknown=0 hor.size=0 vert.size=0
     
  6. matthew henry

    matthew henry New Member

    Messages:
    25
    Hardware:
    RPi3
    I personally couldnt get my setup working with the Mega but it worked perfectly fine with my Uno.

    I have my delayafterconnect set to 500ms , I dont think it needs to be that high but i had issues when it was at 0. I also use 500,000 for the Rate.
     
    • Like Like x 1
  7. Digiwill

    Digiwill New Member

    Messages:
    9
    Hardware:
    RPi3, +Arduino
    Thanks for the insight, I have a Uno coming this Friday I'll test with that when it comes.
    I changed the ms to 500 on Mega with no luck hopefully the Uno will work.
     
  8. matthew henry

    matthew henry New Member

    Messages:
    25
    Hardware:
    RPi3
    did you change the config ?

    init_uart_clock=14745600
     
  9. Digiwill

    Digiwill New Member

    Messages:
    9
    Hardware:
    RPi3, +Arduino
    Sorry, what file is that argument in that I should edit, I just changed the Delay in hypercon to 500 saved the json and uploaded it
     
  10. matthew henry

    matthew henry New Member

    Messages:
    25
    Hardware:
    RPi3
    https://hyperion-project.org/threads/diy-amblight-project-guide-hyperion-ws2801-ws2812b-apa102.8/

    I wouldnt use that sketch though

    Code:
    Login: root
    Password: openelec

    - Mount the boot partition read/write:

    Code:
    mount -o remount,rw /flash
    - Open boot config:

    Code:
    nano -w /flash/config.txt
    Add the following line at the end and be careful not to adjust anything else:

    Code:
    #Increase UART speed
    init_uart_clock=14745600
    Press F2 to save and reboot your Raspberry.
     
  11. Digiwill

    Digiwill New Member

    Messages:
    9
    Hardware:
    RPi3, +Arduino
    Logged in as root, but get this error when trying to execute first line - mount: can't find /flash in /etc/fstab
     
  12. matthew henry

    matthew henry New Member

    Messages:
    25
    Hardware:
    RPi3
    I honestly just downloaded filezilla and went to the actual config folder and edited from there
     
  13. Digiwill

    Digiwill New Member

    Messages:
    9
    Hardware:
    RPi3, +Arduino
    Okay, sounds good sorry I can not test that tonight but I'll get to work on it tomorrow, and get back to you. Thanks again for the help
     
  14. Digiwill

    Digiwill New Member

    Messages:
    9
    Hardware:
    RPi3, +Arduino
    Hey again sorry I have been sick the last few days so couldn't work on the project, but I have good news. Edited config.txt and got the uno today up and running, lights work! thanks so much for your help
     
  15. matthew henry

    matthew henry New Member

    Messages:
    25
    Hardware:
    RPi3
    nice!!!! Yeah im not sure why it doesnt seem to be working correctly with the Mega. I wanted to use the mega because it had a little more memory. Either way glad you are up and running now.
     
  16. TPmodding

    TPmodding Administrator Staff Member Administrator

    Messages:
    1,280
    Hardware:
    RPi1/Zero, RPi2, RPi3, +Arduino, +nodeMCU/ESP8266
  17. matthew henry

    matthew henry New Member

    Messages:
    25
    Hardware:
    RPi3
    just tried

    sketch uploads just fine and I get the Arduino startup affect when plugged into the laptop. If I plug the successful sketch into the RPI I do not get the Arduino Startup effect which is strange. I checked the baudrate and I have it set to 500000 but it seems the RPI still wont even give the startup Arduino effect.
     
  18. TPmodding

    TPmodding Administrator Staff Member Administrator

    Messages:
    1,280
    Hardware:
    RPi1/Zero, RPi2, RPi3, +Arduino, +nodeMCU/ESP8266
    //#define serialRate 460800 // use 115200 for ftdi based boards
    #define serialRate 115200 // use 115200 for ftdi based boards


    try those
     
  19. matthew henry

    matthew henry New Member

    Messages:
    25
    Hardware:
    RPi3
    still nothing, im wondering if the Rpi is not supplying enough power to the mega. Like I said earlier when I connect the usb cable to my laptop I get the arduino startup affect. When I connect the UNO to the RPI I get the arduino startup affect. Unfortunately when I connect the Mega to the RPI there is no startup affect.
     
  20. TPmodding

    TPmodding Administrator Staff Member Administrator

    Messages:
    1,280
    Hardware:
    RPi1/Zero, RPi2, RPi3, +Arduino, +nodeMCU/ESP8266
    and you sure you use the right pin? or maybe try it with another pin?