Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't use Adalight on second screen #7

Open
preiter opened this issue Oct 2, 2016 · 3 comments
Open

Can't use Adalight on second screen #7

preiter opened this issue Oct 2, 2016 · 3 comments

Comments

@preiter
Copy link

preiter commented Oct 2, 2016

I attempted to use the Adalight code with my second screen, but no matter what I did the colors seemed to be coming from the primary display.

After some debugging, the issue seemed to be coming from this line (line 190 of Adalight.pde)

dispBounds[d].x = dispBounds[d].y = 0;

This line was clearing an x offset of 2560 to 0.

Once I got rid of that line of code, it worked fine.

Also, down around line 250 the code is creating and transmitting data for leds.length - 1. I'm not sure what the reason for the -1 is, but my last LED was not getting programmed. I got rid of the -1 and it worked fine.

As a side note, I adapted this project to work over wifi by using the Processing Networking library in place of Serial. My client is running on an esp8266. It was a really easy change to make and way more convenient for my setup than running an extra cable to the TV. You might consider that as a future feature for this project.

@zandegran
Copy link

zandegran commented Dec 27, 2016

This is simple. In the processing code change all the preceding 0's in the sub arrays to 1's
static final int leds[][] = new int[][] {
{0,2,4}, {0,1,4}, ...}

@preiter
Copy link
Author

preiter commented Dec 28, 2016

That index selects one of the displays from the array:

static final int displays[][] = new int[][] {

I have 0 in that field, selecting the first entry in the displays array. The first entry in the displays array was selecting screen 1, but that did not work until I fixed the bug that I noted in my first post.

@blecchi
Copy link

blecchi commented Nov 26, 2018

Wish I read this before I started debugging the code. I found exactly the same bug.
Only the primary screen was captured.
This line is clearly useless, why go through all that code, if you're going to set it to zero eventually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants