Black Lives Matter - Action and Equality. ... Adafruit is open and shipping.
0

Ambilight Project needs some assistance.
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Re: Ambilight Project needs some assistance.

by sacredgaming on Sat Oct 08, 2011 11:45 am

i decided to take your approach and went ahead and ordered the uno so that i can play with programming and will order the 2 strands of led's when they become available.
sacredgaming
 
Posts: 12
Joined: Wed Oct 05, 2011 3:05 pm

Re: Ambilight Project needs some assistance.

by MudHolland on Sat Oct 08, 2011 1:46 pm

Nice!

I can recommend downloading the Processing program and open the program and comment out the lines as pburgess said! That will keep you busy for some time ;)
MudHolland
 
Posts: 26
Joined: Thu Oct 06, 2011 9:29 am

Re: Ambilight Project needs some assistance.

by kmd1970 on Sat Oct 08, 2011 5:57 pm

I just found an Arduino NG Rev. C in a box. I will give it a try. :D
kmd1970
 
Posts: 15
Joined: Thu Oct 06, 2011 4:07 pm

Re: Ambilight Project needs some assistance.

by kmd1970 on Sat Oct 08, 2011 7:00 pm

I gave it a try, however the output window is hidden when media center is fullscreen. :cry:

I will have write some output to the message window. :D This program is the most awesome thing since...I dont know what!! :D ..so cool! You guys will make me go broke with all these great projects.

This is what it looks like when the media center window is streched to the corners. Works like a charm!

Image
kmd1970
 
Posts: 15
Joined: Thu Oct 06, 2011 4:07 pm

Re: Ambilight Project needs some assistance.

by kmd1970 on Sat Oct 08, 2011 8:18 pm

I am trying to save the screenshot to a file, but I keep getting an error:

PImage.save() requires an absolute path. Use createImage(), or pass savePath() to save().

Anyone know the proper way to save the screenshot to a file?

Code: Select all | TOGGLE FULL SIZE
String savePath = "logs/";

String s="log_"+year() + "-" + nf(month(),2) + "-"  + nf(day(),2) + "_"  + nf(hour(),2) + "-"  + nf(minute(),2) + "-"  + nf(second(),2) + "-"  +  nf(millis(),2) + ".jpg";
 
screenShot.save(savePath + s);


EDIT: I figured it out. Code should be: :mrgreen:

Code: Select all | TOGGLE FULL SIZE
String savePath = "logs/";

String s="log_"+year() + "-" + nf(month(),2) + "-"  + nf(day(),2) + "_"  + nf(hour(),2) + "-"  + nf(minute(),2) + "-"  + nf(second(),2) + "-"  +  nf(millis(),2) + ".jpg";
 
preview.save(savePath + s);
kmd1970
 
Posts: 15
Joined: Thu Oct 06, 2011 4:07 pm

Re: Ambilight Project needs some assistance.

by MudHolland on Sun Oct 09, 2011 2:32 am

What happens when you play WMC full screen and then alt tab to the preview window?
MudHolland
 
Posts: 26
Joined: Thu Oct 06, 2011 9:29 am

Re: Ambilight Project needs some assistance.

by GsJosh on Sun Oct 09, 2011 8:23 am

Could somebody check for CPU usage of the screen capture program when running? I will be running this FullHD (as most of us will do I suppode) and I have a hunch that this will be pretty intense. I have limited power in my HTPC and I'm not really looking forward to having this all setup and then coming to the conclusion that it pulls 50% CPU.
GsJosh
 
Posts: 7
Joined: Sun Oct 09, 2011 8:21 am

Re: Ambilight Project needs some assistance.

by kmd1970 on Sun Oct 09, 2011 4:32 pm

GsJosh wrote:Could somebody check for CPU usage of the screen capture program when running? I will be running this FullHD (as most of us will do I suppode) and I have a hunch that this will be pretty intense. I have limited power in my HTPC and I'm not really looking forward to having this all setup and then coming to the conclusion that it pulls 50% CPU.


I am using an intel core i7 930 machine as my HTPC/Gaming machine with a 52 inch HDTV run @ 1920 x 1080. CPU/Core usage is very low for me.
kmd1970
 
Posts: 15
Joined: Thu Oct 06, 2011 4:07 pm

Re: Ambilight Project needs some assistance.

by sacredgaming on Sun Oct 09, 2011 4:57 pm

gsjosh you should probably list the specs of your htpc that would give some of these guys a better idea of what to tell you.
sacredgaming
 
Posts: 12
Joined: Wed Oct 05, 2011 3:05 pm

Re: Ambilight Project needs some assistance.

by kmd1970 on Sun Oct 09, 2011 5:11 pm

Bad news, screenshots are always black when Media Center is fullscreen.

I also googled the issue and found out that many people have tried to fix this and failed. So currently, this wont for media center in fullscreen. :(

If you dont mind having your media center window strected to the corners of your screen, it will work fine.

Image

I also tested VLC, Hauppauge WinTv7 and Windows Media Player 12. All of them work fine in fullscreen, so there are other options. :)

One small ray of hope:

I noticed that when Media Center is in fullscreen the Print Screen button would also generate an all black image. So I googled the issue. :wink: I found this registry tweak that will turn on screenshots in Windows Media Center:

1. Run Regedit and go to :

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Media Center\Service\Video

2. Right-click in the right-pane.
3. Click New and select the appropriate DWORD for your system.
4. Name the new DWORD EnablePrintScreen.
5. Double-click the new DWORD.
6. In the Value data textbox, input 1.
7. Click the OK button.
8. Restart your computer for the change to take affect.

After doing this the Print Screen button now works with Media Center in fullscreen :)

It didnt fix the adalight screenshot issue (still black), but if I can simulate a printscreen button press and use the clipboard data as a pimage for adalight, then maybe I can get it to work. :?: I will try to test.
kmd1970
 
Posts: 15
Joined: Thu Oct 06, 2011 4:07 pm

Re: Ambilight Project needs some assistance.

by kmd1970 on Sun Oct 09, 2011 5:45 pm

Exception in thread "Animation Thread" java.lang.IllegalStateException: cannot open system clipboard :evil:
kmd1970
 
Posts: 15
Joined: Thu Oct 06, 2011 4:07 pm

Re: Ambilight Project needs some assistance.

by MudHolland on Mon Oct 10, 2011 3:29 am

As pburgess said, the frame buffer is circumvented to make the copying of copyrighted material harder.. Or it's just a way of windows to lower processor load?..

Don't know if there's a specific reason you use WMC but programs like XBMC use a workaround that renders full screen as your way of stretching it. Maybe there's a plug in or 'hack' that enables a full screen stretch instead of true full screen... All in all, I highly recommend XBMC for all your htpc needs.

Bummer for this all is that gaming is never going to happen...
MudHolland
 
Posts: 26
Joined: Thu Oct 06, 2011 9:29 am

Re: Ambilight Project needs some assistance.

by MudHolland on Thu Oct 13, 2011 11:06 am

This will help a bit:

frame.setAlwaysOnTop(true);
MudHolland
 
Posts: 26
Joined: Thu Oct 06, 2011 9:29 am

Re: Ambilight Project needs some assistance.

by jeffre on Tue Oct 18, 2011 4:03 pm

@MudHolland

Did your code for 18 by 9 look like this?

static final int coord[][] = new int[][] {
{8,8}, {7,8}, {6,8}, {5,8}, {4,8}, {3,8}, {2,8}, {1,8}, {0,8}, // Bottom edge, left half
{0,7}, {0,6}, {0,5}, {0,4}, {0,3}, {0,2}, {0,1}, // Left edge
{0,0}, {1,0}, {2,0}, {3,0}, {4,0}, {5,0}, {6,0}, {7,0}, {8,0}, {9,0}, {10,0}, {11,0}, {12,0}, {13,0}, {14,0}, {15,0}, {16,0}, {17,0}, // Top edge
{17,1}, {17,2}, {17,3}, {17,4}, {17,5}, {17,6}, {17,7}, // Right edge
{17,8}, {16,8}, {15,8}, {14,8}, {13,8}, {12,8}, {11,8}, {10,8}, {9,8} // Bottom edge, right half
};

static final int arrayWidth = 18, // Width of Adalight array, in LED pixels
arrayHeight = 9, // Height of Adalight array, in LED pixels
imgScale = 20, // Size of displayed preview
samples = 20, // Samples (per axis) when down-scaling
s2 = samples * samples;
jeffre
 
Posts: 5
Joined: Tue Oct 18, 2011 2:45 pm

Re: Ambilight Project needs some assistance.

by MudHolland on Tue Oct 18, 2011 5:25 pm

No, because 18*9 would add op to 18+7+18+7 = 50 LEDs, so i don't leave a space open for the stand (I've got my main TV fixed to the wall, so no stand). The it's simply filling in the numbers, with the first line starting with the LED you would like to 'write' first:

{8,8} ... {0,8},
{0,7} ... {0,1},
{0,0} ... ... ... {17,0},
{17,1} ... {17,7},
{17,8} ... {9,8}

So, yours seems exact... If I copy paste it it works... Is there a reason you ask?
MudHolland
 
Posts: 26
Joined: Thu Oct 06, 2011 9:29 am

Please be positive and constructive with your questions and comments.