Run Adalight Script without pop up Window!?
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- jadonv
- Posts: 23
- Joined: Sat Jun 16, 2012 1:52 pm
Run Adalight Script without pop up Window!?
Hi i was wondering if there was anyway to change up the code to adalight.pde so that there is no window that ops up after running it. ? Thanks so much look forward to a reply.
- pburgess
- Posts: 4161
- Joined: Sun Oct 26, 2008 2:29 am
Re: Run Adalight Script without pop up Window!?
It's tricky, because Processing is sort of implicitly a visual tool. But here's a kludge that seems to work for Mac and probably Linux. I'm not sure about Windows, but changing "/dev/null" to "\Device\Null" might do the trick.
Make a copy of Adalight.pde, because this is a pretty drastic change.
Add this line to the top of the sketch:
Find this line (around line 232 or so):
and change it to:
Scroll up and find this line, around line 138-ish:
MOVE this line (and the comments around it, if you like) DOWN so that it appears right AFTER the "size" line.
Give it a shot and see what you get.
Make a copy of Adalight.pde, because this is a pretty drastic change.
Add this line to the top of the sketch:
Code: Select all
import processing.pdf.*;
Code: Select all
size(totalWidth * pixelSize, maxHeight * pixelSize, JAVA2D);
Code: Select all
size(totalWidth * pixelSize, maxHeight * pixelSize, PDF, "/dev/null");
Code: Select all
port = new Serial(this, Serial.list()[0], 115200);
Give it a shot and see what you get.
- jadonv
- Posts: 23
- Joined: Sat Jun 16, 2012 1:52 pm
Re: Run Adalight Script without pop up Window!?
this worked perfectly and is just perfect for advanced launcher in xbmc! thanks a bunch!
- jadonv
- Posts: 23
- Joined: Sat Jun 16, 2012 1:52 pm
Re: Run Adalight Script without pop up Window!?
BTW this speeds the lights up times 100
-
- Posts: 2
- Joined: Sun Dec 15, 2013 4:42 pm
Re: Run Adalight Script without pop up Window!?
Has anyone figured this our for Windows 7? I tried changing changing "/dev/null" to "\Device\Null" with no luck.
- jsimon836
- Posts: 2
- Joined: Mon Nov 10, 2014 9:05 pm
Re: Run Adalight Script without pop up Window!?
So this entire setup works perfect except my red and blue controls are switched. For example, If I put a blue object near the edge of the screen it shows up red on the LEDs. The processing preview shows the right color. The arduino sequence shows Blue green red not RGB. Please Help!
Thanks!
Thanks!
- pburgess
- Posts: 4161
- Joined: Sun Oct 26, 2008 2:29 am
Re: Run Adalight Script without pop up Window!?
Open the file Adalight.pde in Processing and look for this block of code (around line 386):
Reverse the order of 0 & 2 and everything should be good:
Code: Select all
// Apply gamma curve and place in serial output buffer
serialData[j++] = gamma[ledColor[i][0]][0];
serialData[j++] = gamma[ledColor[i][1]][1];
serialData[j++] = gamma[ledColor[i][2]][2];
Code: Select all
// Apply gamma curve and place in serial output buffer
serialData[j++] = gamma[ledColor[i][2]][2];
serialData[j++] = gamma[ledColor[i][1]][1];
serialData[j++] = gamma[ledColor[i][0]][0];
- jsimon836
- Posts: 2
- Joined: Mon Nov 10, 2014 9:05 pm
Re: Run Adalight Script without pop up Window!?
Thank you so much for the quick and helpful response the color shift worked!
I have two more quick questions, was there ever a solution to the preview window being hidden on Windows? And when I try to export the application in Processing neither of the created applications for 32 bit or 64 bit work for my system. I am running 64 bit. any advice with making the standalone export version work with Windows?
Thanks so much in advance for your help. This project looks great and I appreciate all your hard work.
I have two more quick questions, was there ever a solution to the preview window being hidden on Windows? And when I try to export the application in Processing neither of the created applications for 32 bit or 64 bit work for my system. I am running 64 bit. any advice with making the standalone export version work with Windows?
Thanks so much in advance for your help. This project looks great and I appreciate all your hard work.
- Tim92
- Posts: 2
- Joined: Wed Apr 01, 2015 1:05 pm
Re: Run Adalight Script without pop up Window!?
For any Windows Users searching this topic: you have to use "NUL" instead of "dev/null/".
see here: http://stackoverflow.com/questions/3131 ... in-windows
see here: http://stackoverflow.com/questions/3131 ... in-windows
- muedelaisla
- Posts: 1
- Joined: Mon Dec 25, 2017 5:22 am
Re: Run Adalight Script without pop up Window!?
is possible an android smart box?? by otg port and processing apk??
Please be positive and constructive with your questions and comments.