Adalight Limitations?

EL Wire/Tape/Panels, LEDs, pixels and strips, LCDs and TFTs, etc products from Adafruit

Moderators: adafruit_support_bill, adafruit

Adalight Limitations?

Postby idkwat2namme » Thu Oct 27, 2011 9:59 pm

Does anyone know or may be able to look into using 50 LEDs on one Arduino? Or can 2 Arduinos watch the screen?

The reason I ask is because I am running 3 monitors at 5760x1080. I think just 25 LEDs would look weak.

Can the software even handle this large of a resolution? Any help or insight would be great.

I am looking to add 50 or even 75 LEDs (2-3 kits) around my screens, should look good, I just want to make sure it is possible. Thanks! :D
idkwat2namme
 
Posts: 4
Joined: Sat Nov 06, 2010 4:45 pm

Re: Adalight Limitations?

Postby pburgess » Fri Oct 28, 2011 6:22 pm

50 LEDs should be fine for a "classic" Arduino (Uno, etc.). More than that, and you'd want to use the 32u4 Breakout Board+ instead (which has 'native' USB and avoids the serial bottleneck).

It's then a matter of whether computer has enough "oomph" to process that many pixels (most likely a Core i5 or better could handle it, but that's a guesstimation and not fact), whether a Processing sketch is "aware" of multiple monitors (don't have the right setup here to test with), and whether this is for general use or for games (which will likely be using DirectX or OpenGL, and Processing might not be able to do screen captures of that).

This thread shows how to do a dry run without any pixels or Arduino attached, so you can at least get an initial impression whether this is likely to work with your hardware setup:

viewtopic.php?f=47&t=23248#p121758
User avatar
pburgess
 
Posts: 1327
Joined: Sun Oct 26, 2008 1:29 am

Re: Adalight Limitations?

Postby illiac4 » Tue Nov 08, 2011 1:11 pm

Bobo1on1the author of boblight once said to me that the numbers of channels will not increase the cpu usage. At the moment i'm using 4 channels with amblone like project and apple tv 1 and it works great.
I will try with around 40 channels and will report back if this is true.
illiac4
 
Posts: 13
Joined: Mon Nov 07, 2011 1:43 am

Re: Adalight Limitations?

Postby judgeAdrizle » Sat Mar 31, 2012 12:59 pm

Hello, I am also running 3 Surround Monitors with a resolution of 5161x1050 (Bezel) and I was wondering if there was a way to make it so it only reads the center monitor? i.e. When I am running a video from Youtube on fullscreen there are Black borders on the sides so only the top and bottom lights would light up and not the side. Is there a way to set the width to start at lets say 1600 and end at 3561 ( as opposed from width 0 to 5161)? this way it only captures images from the center.
Any info would help,
Thanks
judgeAdrizle
 
Posts: 6
Joined: Sat Mar 31, 2012 12:50 pm

Re: Adalight Limitations?

Postby pburgess » Sun Apr 01, 2012 12:12 am

judgeAdrizle: if you're using the Adalight software, then it's pretty simple, yeah. In the Processing source file Adalight.pde, look for this block of code:

Code: Select all
static final int displays[][] = new int[][] {
   {0,9,6} // Screen 0, 9 LEDs across, 6 LEDs down
//,{1,9,6} // Screen 1, also 9 LEDs across and 6 LEDs down
};


Change this so that the first number is the system screen number of your middle display. This isn't necessarily always sequential left-to-right, but it's simple enough to give it a test run each of three ways (0, 1 or 2). The modified code might look like this:

Code: Select all
static final int displays[][] = new int[][] {
   {1,9,6} // Screen 1, 9 LEDs across, 6 LEDs down
};
User avatar
pburgess
 
Posts: 1327
Joined: Sun Oct 26, 2008 1:29 am

Re: Adalight Limitations?

Postby judgeAdrizle » Sun Apr 01, 2012 11:25 am

Ok Thanks!

I changed the 0 to a 1 but along the code i get several errors, where i see a 0, i change it to a 1 but when i get to this line:

range = (float)dispBounds[d].width / (float)displays[d][1];

I am not sure what to do with this one, I get the error code: NullPointerException.

Im pretty sure that my system thinks that my 3 monitors is actually 1 monitor and not seperate monitors, so im not sure if changing 0 to 1 will work, is there a way to set the bounds width within one monitor?

Any Ideas?
Attachments
Untitled.jpg
Untitled.jpg (146.1 KiB) Viewed 1260 times
Last edited by judgeAdrizle on Sun Apr 01, 2012 12:17 pm, edited 1 time in total.
judgeAdrizle
 
Posts: 6
Joined: Sat Mar 31, 2012 12:50 pm

Re: Adalight Limitations?

Postby pburgess » Sun Apr 01, 2012 12:17 pm

Howdy,

You should only need to change the table shown. Changing 0's to 1's elsewhere in the code will cause...trouble. I'd suggest putting the code back how it was, making the change only to the table, and if you're encountering problems with that then let me know and I can try to sort out where the trouble lies.
User avatar
pburgess
 
Posts: 1327
Joined: Sun Oct 26, 2008 1:29 am

Re: Adalight Limitations?

Postby judgeAdrizle » Sun Apr 01, 2012 12:21 pm

OK, when i just change that 0 to 1, this is the first error:

Thanks again
Attachments
Untitledd.jpg
Untitledd.jpg (115.15 KiB) Viewed 1260 times
judgeAdrizle
 
Posts: 6
Joined: Sat Mar 31, 2012 12:50 pm

Re: Adalight Limitations?

Postby pburgess » Sun Apr 01, 2012 7:52 pm

Ah! That's interesting. The system maps it out as one large display, rather than three smaller ones. Kinda cool.

But yeah, we can work around this...

First, let's set the screen # back to 0 in that table. Also, change the middle number (the # of LEDs across) to 3X the original value, a la:

Code: Select all
static final int displays[][] = new int[][] {
   {0,27,6} // Screen 0, 27 LEDs across, 6 LEDs down
};


Next, add 9 to the middle number in each of the three-number clusters in the leds[] array, like this:

Code: Select all
static final int leds[][] = new int[][] {
  {0,12,5}, {0,11,5}, {0,10,5}, {0,9,5}, // Bottom edge, left half
  {0,9,4}, {0,9,3}, {0,9,2}, {0,9,1}, // Left edge
  {0,9,0}, {0,10,0}, {0,11,0}, {0,12,0}, {0,13,0}, // Top edge
           {0,14,0}, {0,15,0}, {0,16,0}, {0,17,0}, // More top edge
  {0,17,1}, {0,17,2}, {0,17,3}, {0,17,4}, // Right edge
  {0,17,5}, {0,16,5}, {0,15,5}, {0,14,5}  // Bottom edge, right half
};


Finally, you'll probably want to disable full-screen captures (though I'd encourage you to try it both ways just in case, see which is faster):

Code: Select all
static final boolean useFullScreenCaps = false;


And I think that'll do it!
User avatar
pburgess
 
Posts: 1327
Joined: Sun Oct 26, 2008 1:29 am

Re: Adalight Limitations?

Postby judgeAdrizle » Sun Apr 01, 2012 8:32 pm

Wow sweet! yea that did it. I should get my lights in sometime this week. when i run Processing I can tell it works from the window display that comes up.

Now i can switch it back and forth when watching videos or playing games. Very cool.

I appriciate all the help and hopefully this helps others with similar set-ups.

Ill post again when i get my rig up and running.

THANKS AGAIN!

Untitled.jpg
Untitled.jpg (715.61 KiB) Viewed 1240 times

Heres a pic how it reads the center of the screen.
judgeAdrizle
 
Posts: 6
Joined: Sat Mar 31, 2012 12:50 pm

Re: Adalight Limitations?

Postby judgeAdrizle » Wed Apr 04, 2012 2:51 pm

Hey i got my setup up and going but there are a couple problems.

i would like to turn up the brightness of the lights but am not sure what to change.

Also, when i try to play a game the lights dont seem to respond.
judgeAdrizle
 
Posts: 6
Joined: Sat Mar 31, 2012 12:50 pm

Re: Adalight Limitations?

Postby pburgess » Wed Apr 04, 2012 5:34 pm

Howdy howdy howdy,

A couple things you can try regarding brightness. Well...but first...nothing can be done about the maximum brightness (all white) other than adding more LEDs to the setup...pure white already equates to the LEDs' brightest setting. But for the low and mid range, there's a couple things you can try, both of them in the Adalight.pde sketch:

First, around line 21, look for this:
Code: Select all
static final short minBrightness = 120;

You can increase that number to set a minimum amount of backlighting at all times. Valid range is 0 to 255, though the larger the number, the less variation in light response you'll see (at 255, everything will just be white all the time, regardless of screen content).

Second, around line 237, look for this:
Code: Select all
    f           = pow((float)i / 255.0, 2.8);

This is the gamma-correction function, which aims to get a linear response from the LEDs (so that 50% brightness on-screen equals 50% brightness on the LEDs). Trying a slightly lower number (like 2.0 to 2.5) will boost the midrange brightness a bit. But too low, everything washes out again.

There's also a hardware fix: paint the wall behind the monitor a highly diffuse white, or pin up a big sheet of white illustration board or other bright material. I found someone on eBay selling inexpensive "factory seconds" of projection screen canvas, and the stuff is just wonderful for this.

As for games: yeah, some games and also banned software don't always work with Adalight, reason being that they're using hardware features that bypass the normal frame buffer, so normal code never gets a chance to see it. A couple things to try here include turning off the "Aero" features of Win7, check if the game includes a "software renderer" feature. Something else you might take a look at is a program called Lightpack which uses lower-level functions that can sometimes still screen-grab these hardware-accelerated games, and recent versions work with the Adalight hardware. Just a disclaimer though that it's not our code, don't know how it works on the inside, so I can't really offer any help for that if it doesn't quite work. It's free and has a nice UI though, certainly worth giving it a shot. http://code.google.com/p/lightpack/downloads/list
User avatar
pburgess
 
Posts: 1327
Joined: Sun Oct 26, 2008 1:29 am

Re: Adalight Limitations?

Postby judgeAdrizle » Wed Apr 04, 2012 11:21 pm

ok cool, yea its starting to look a lot better with a solid white background to light up.

One more thing, i noticed that the transition speed was a little delayed
i changed this and it did seem to speed up but still noticed a bit of a delay:

static final short fade = 0;

is there another part of the code to change to have the LED speed instant?
judgeAdrizle
 
Posts: 6
Joined: Sat Mar 31, 2012 12:50 pm

Re: Adalight Limitations?

Postby pburgess » Thu Apr 05, 2012 12:32 am

There's always going to be at least a small bit of lag, reason being that the code is doing a series of screen grabs...the content is already up on the screen by the time the software captures it, filters it down and issues it out the serial port. But there are a few things you can try to minimize this:

[*]Test both 'true' and 'false' for the useFullScreenCaps variable in Adalight.pde.
[*]Test with Aero disabled, and/or try a 16-bit color mode.
[*]Faster computer always helps...though with that nice three screen setup, I'd bet you're already using a pretty nice rig there. :D
[*]A USB-native microcontroller (like the Teensy or Adafruit 32u4 Breakout Board) will offer slightly faster serial throughput than an Arduino UNO.
[*]The previously-mentioned Lightpack software offers a few different capture modes, and some settings may be faster than Adalight. The price is right, may as well experiment!

None of these will make a huge night-and-day difference, but each might provide a few percent here and there (but as originally explained, a certain minimum amount of lag (~1/60 sec) is inevitable).
User avatar
pburgess
 
Posts: 1327
Joined: Sun Oct 26, 2008 1:29 am


Return to Glowy things (LCD, LED, TFT, EL) purchased at Adafruit

Who is online

Users browsing this forum: No registered users and 6 guests

Stuff to buy from the Adafruit store and links to product documentation!


New Products [102]

Raspberry Pi[80]
 
FLORA[23]
 
Bunnie Studios[9]
 
FPGA[1]
 
mbed[11]
Arduino[60]
 
NETduino[14]
 
BeagleBone[24]
 
Android[6]
 
XBee[10]
More Dev Boards[30]


 
BoArduino[8]
 
SpokePOV[4]
 
TV-B-Gone[4]
 
MiniPOV[3]
 
SIM reader[3]
 
Microtouch[5]
 
Clocks & Watches[18]
 
Drawdio[4]
 
Brain Machine[1]
 
Game of Life[2]
 
MintyBoost[2]
More DIY Kits[16]


 
MaKey MaKey[3]
 
Tweet-a-Watt[5]
 
Young Engineers[33]
 
Discover Electronics[2]
 
Snap Circuits[4]
 
littleBits[3]
 
Project packs[8]


 
Breakout Boards[33]
LCDs & Displays[48]
Components & Parts[69]
Batteries & Power[49]
EL Wire/Tape/Panel[52]
LEDs[108]
 
Wireless[14]
Cables[60]
 
Lasers[6]
Sensors/Parts[145]
 
Enclosures/Cases[11]
 
Solar[11]
 
RFID / NFC[13]
Prototyping[69]
 
iDevices[13]
Tools[71]
 
Wearables[39]
 
CNC[37]
 
Robotics[29]
 
3D printing[1]
 
Materials[24]


 
Stickers[41]
 
Skill badges[55]
 
Books[25]
 
Circuit Playground[7]
 
Gift Certificates[4]