fabsenet/adrilight

Adrilight does not "capture" screen?

Closed this issue · 8 comments

Hi Fabian, nice work!

Unfortunately it is being a frustrating pain for me right now. Please help... Also, bear in mind I am no wizard at all, but I am stubborn! ;-)

First of all, I guess the problem is very similar to this... #9

MY RIG.
So, the prototype is as you see in the pic. Basically, WIN10, GTX970 in 4K, Arduino UNO (tried a NANO as well, same results), 5V external power supply, controller on D3.
There are 56 LEDs (2x18+2x10 strips) of WS2811 (or WS2812B, I have tried both in the FastLED.addLeds).
img_3137
or picture here: https://ibb.co/kpfC2G

THE PROBLEM
LEDs do enter in a rainbow cycle, but when I use the TEST OVERLAY all squares are black and nothing changes in the LEDs (they keep... rainbowing)
If I use LED OUTPUT, the LEDs freeze to their last color and the Arduino LED starts blinking like crazy. (FYI, using Bambilight in a similar fashion turns off all LEDs and then I get no other response until I hard-reset all).
By the way, what is LED OUTPUT supposed to do???

THE QUESTION?
Whyyyyyyyy? I feel I am so close to a beautiful undertaking... Please help out. In sum, it seems that Adrilight.exe does not capture the screen's color. It does talk to the Arduino somehow, but it's not sending the good stuff, right? Maybe has to do with Resolution? (going to try a few tests), or DirectX? Thanks a lot for the help.

THE CODE
The code is as follows (standard, just changed the number of LEDs).

#include "FastLED.h"

#define NUM_LEDS (2*18+2*10)
#define LED_DATA_PIN 3
#define NUM_BYTES (NUM_LEDS*3) // 3 colors  

#define BRIGHTNESS 255
#define UPDATES_PER_SECOND 60
///snipped

UPDATE1: Using Matyaskov's code (with changed number of LEDs) here #37

it behaves a little different:

  1. The cycling rainbow is slower
  2. with LED OUTPUT all LEDs go black (except for the Arduino's) and do not come back if I deselect it. I had to re-flash the previous code to turn them on again.

UPDATE 2: Using linear lighting, the test spots actually pick up the right colors! So, they do capture the screen properly. Yet, the LEDs keep on rainbowing or staying frozen if I select LED OUTPUT.

Also, unsure about baud rate.... You say it should be 100000 max, but your code has 115200 (this is where it may be obvious I am an ignorant...)

ANOTHER UPDATE: I have read this, from this project https://www.mc-guinness.co.uk/blog/20160909/make-a-tv-pc-monitor-ambilight/

"For info: The Arduino can run off a separate 12v or 5v supply through the VIN/pin 30 (for 12v) input or +5V / pin 27 (for 5V) so you could run the Arduino directly off the barrel connector and it’s power supply. You’ll not be able to use for the Ambilight project since if you do this, it effectively takes the USB input out of the loop and we can’t then get data in from the computer but it is good to know for future standalone Arduino projects."

I have tried both with and without 5V going into the Arduino and the result does not change...

okay, if you see the rainbow effect, it means: your number of LEDs in the arduino code is correct and your wiring and power supply are good. that is a good start.

if you start the pc software and let it send data, the arduino turns of the rainbow colors. if you later close the pc app, the arduino stays black. this is intended to be not disturbing.

the baud rate MUST BE 1.000.000 (one million!) to work in adrilight. this is the most probable cause for your error. the pc app has a fixed baudrate of 1000000 and the arduino code has to have the same number or it will simply not work. also the number needs to be that high because this high bandwidth is needed to provide a high frame count per second and high fidelity. if your hardware is limitted and cannot get such a high serial communication working, I suggest you by another arduino. I have an arduino uno clone and it is working absolutely stable with this high baud rate but looking at the issues, there might be other arduinos and stuff, which do not work this well.

the overlay in the current 1.x release is kind of broken and I am actively working on something way nicer. the problem is, the overlay itself interferes with the visible colors and therefor it is color "feedback" and it turns black. you definetly cannot use the overlay to detect colors. you only can use it to setup the color detection spots. then you must disable it or else ardrilight will only see black color on the screen. also, you need to enable the output (checkbox next to the comport dropdown). this will enable the actual sending of color data to the arduino. (this will also disable the rainbow at this point).

please let me know if this was of any help!

seeing the rainbow at first is a really good sign!

Is it working?

Hi, sorry if it took a while but yes, it fixed it! Thanks a lot. The issue is the baud rate. Now I have an issue with flickering all over, but I know my power supply is not the best... Also, seems that the #define BRIGHTNESS (0 to 255) in the arduino code helps reducing flickering, but could it be possible to introduce a brightness control from Adrilight interface? Prismatik does it nicely, for example. Thanks again

if you have a not enough power than you should better fix that than trying to reduce the brightness. ws2802 has 8 bit per channel leaving you with 256 levels of white/grey. this does not change when you adjust brightness regardless where you do it. so everything you change will reduce the fidelity and the dynamics!

If you really need to, you can use all 3 white balance sliders and reduce them to the equally low level.

hello i have a problem a
in standby it work in rainbow when i start sending the led freez
i modif only led number 54 with 31
the rainbow is work but in sending it is freez rainbow i need to make reset