dmadison / Adalight-FastLED

Adalight with FastLED support
GNU General Public License v3.0
361 stars 70 forks source link

Red flash from the strip when arduino wakes upon PC boot. #24

Closed devsfan1830 closed 4 years ago

devsfan1830 commented 4 years ago

Hi. First off your write up to make this and your code is awesome. Easy to follow and based on comments on various sections of the build and some comments in the two github repos, I have mine wired up to an 120Hz alienware ultrawide with 120 APA102 LEDS running on an Arduino Pro Micro with a 1,000,000 baud rate able to successfully run them at 15ms. It operates smooth as butter after some confusion on maybe my part as far as the RGB settings and having the LED order reversed in Prismatik. Prismatik had to be set to RGB while BGR was set in arduino to not have R and B swapped. Not sure if I missed that in your write up somewhere.

Anyways. My issue is regarding when the LEDS get woken up from their sleep mode when I turn my PC on and Prismatik connects. The entire strip flash full brightness red for a half second before setting to the correct color. I was hoping there's a way to soften this wakeup transition a bit as its pretty jarring. I'm running on the latest releases of Prismatik and your code. Any other info you need from me let me know and thanks again for making this. Its incredible and far better in my eyes than stuff like Hue or Nanoleaf and at a fraction of the cost.

dmadison commented 4 years ago

Hi there! Thanks for the kind words - I'm glad I was able to help you get up and running. I don't believe there's anything about the color order in my writeup, although as you've discovered it's easy enough to experiment and get it right. Typically I would recommend the setup you have where the device does the channel correction and the color data is sent in RGB order, but at the end of the day whatever works is fine.

Sorry to hear about the full brightness red frame, that can't be pleasant. A few questions to try and narrow down the source of the issue:

devsfan1830 commented 4 years ago

Wow appreciate the quick reply. Yep Prismatik set to RGB and corrected in code to BGR. To answer your questions:

1 Every time. 2) When Prismatik connects. When board is powered on LEDs stay off until Prismatik connects 3) Clicking the sun icon to turn them off and on it's perfectly fine. I can however repeat the red flash by stopping and starting Prismatic. 4) Reducing brightness or number of leds has no effect other than reduced brightness of the flash or just flashing that subset of leds. Reducing # of LEDs by itself has no noticeable effect on brightness. 5) Increased grab rate up to 1fps, still flashes on Prismatik connect. Adjusting # of leds in Prismatik does not change flash. 6) Powered by a 5V 10A supply with power injected at both ends of the strip. Wired the same as in the guide with the same cap and resistor.

On Sat, Aug 22, 2020 at 11:22 PM Dave Madison notifications@github.com wrote:

Hi there! Thanks for the kind words - I'm glad I was able to help you get up and running. I don't believe there's anything about the color order in my writeup, although as you've discovered you it's easy enough to experiment and get it right. Typically I would recommend the setup you have where the device does the channel correction and the color data is sent in RGB order, but at the end of the day whatever works is fine.

Sorry to hear about the full brightness red frame, that can't be pleasant. A few questions to try and narrow down the source of the issue:

  • Does the flash happen every time, or is it intermittent?
  • Does the red frame happen when the PC is turned on (i.e. board is powered) or when Prismatik connects for the first time (i.e. serial data is sent)?
  • If the latter, does turning off the LEDs in Prismatik and then back on also cause a red flash? Does shutting down Prismatik entirely and restarting it cause a flash?
  • Does the flash change (# of LEDs illuminated, color, intensity, duration) if you change the number of LEDs in the Arduino code? Does it change if you set a different max brightness in the Arduino code?
  • Does the flash change if you set a different number of LEDs in the Prismatik code, but don't adjust the number on the Arduino? What about a different grab rate in Prismatik?
  • How are you powering the LEDs? Are you connecting power at multiple points?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dmadison/Adalight-FastLED/issues/24#issuecomment-678723975, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGVRSDHR2MYYTC2VY77C2SLSCCDQ5ANCNFSM4QINBXBA .

dmadison commented 4 years ago

Thanks for those answers, that's really helpful. Just to be clear - if you keep the number of LEDs in the Arduino code at 120, and you decrease the number of LEDs in the Prismatik setup to 60, all 120 LEDs flash red when Prismatik connects?

I'm knee-deep in the end stages of a project at the moment, but I'll try to set aside some time next week to look into this.

devsfan1830 commented 4 years ago

Hey whenever you can get to it is fine by me. It's not a total dealbreaker bug. I've halved the brightness overall for my setup and it's a bit less eye stabbing but so far its just start startup. The setup works great otherwise. To answer your question, if I reduce the LEDs in Arduino code to 60 and set 120 in Prismatik, just the first 60 in the string flash red when Prismatic starts. If i set it to 120 in code and 60 in Prismatik actually a new behavior has arisen when I went to retest this. I use the wizard to adjust the number of leds and then finishing it following the color temp adjustment the 60 flash red. When I close then start Prismatik, the first 60 LEDs get stuck red. FPS is at zero. Then when i toggle the sun/moon off and on the 60 leds do the red flash and then go back to responding normally. Hope this helps.

On Sun, Aug 23, 2020 at 2:31 PM Dave Madison notifications@github.com wrote:

Thanks for those answers, that's really helpful. Just to be clear - if you keep the number of LEDs in the Arduino code at 120, and you decrease the number of LEDs in the Prismatik setup to 60, all 120 LEDs flash red when Prismatik connects?

I'm knee-deep in the end stages of a project at the moment, but I'll try to set aside some time next week to look into this.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dmadison/Adalight-FastLED/issues/24#issuecomment-678808397, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGVRSDFPVNFU5LE5STKYM7TSCFOALANCNFSM4QINBXBA .

dmadison commented 4 years ago

After some testing I've confirmed that this is a bug with Prismatik and not due to the firmware on the Arduino. See psieg/Lightpack#385 for more details.

I'd recommend reverting to Prismatik version 5.11.2.19 until the issue is resolved.

devsfan1830 commented 4 years ago

YEP! That solved it. Thanks for taking the time to help investigate!

On Wed, Aug 26, 2020 at 4:22 AM Dave Madison notifications@github.com wrote:

After some testing I've confirmed that this is a bug with Prismatik and not due to the firmware on the Arduino. See psieg/Lightpack#385 https://github.com/psieg/Lightpack/issues/385 for more details.

I'd recommend reverting to Prismatik version 5.11.2.19 https://github.com/psieg/Lightpack/releases/tag/5.11.2.19 until the issue is resolved.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dmadison/Adalight-FastLED/issues/24#issuecomment-680734913, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGVRSDB5AOHOY45BYV6XANTSCTA37ANCNFSM4QINBXBA .