Main > Main Forum
LED-Wiz USB LED and Output Control Device now available. *Blinky lights*
Roughy:
Hrm...
Then, that begs the next question:
In theory, it sounds as if I should be able to run all of my LEDs through the LEDWiz and not have LEDWiz controlling anything at all.
Then, when LEDWiz gets some appropriate software that I can use, simply "turn it on" and let 'er rip and run as it's meant to, and in the meantime, everything simply lights up.
Make sense? Worth the LEDWiz purchase risk even though it's not finalized?
Wienerdog:
--- Quote from: RandyT on December 24, 2005, 05:22:35 pm ---Download it here
--- End quote ---
Thanks, now I feel bad that I didn't get you anything! I can't wait to play around with this...
Finish my cab... play with my LED-wiz... finish my cab... play with my LED-Wiz... I can't decide.
webgeek:
Many thanks to Randy for all the work he has put into this. I recieved my LED Wiz from him today. I've since wired it up to an RGB LED for experimenting. Many things have worked great, but I'm having trouble when I try to really get into it via code. First, I attempted to use the clipboard capabilities from C#. My code looks something like this (note that this is all badly hacked together for testing and then hacked more to take as little room as possible in here):
--- Code: ---for(int r = 0; r < 48; r++) {
for(int g = 0; g < 48; g++) {
for(int b = 0; b < 48; b++) {
String command = "LWZ-RGB:1," + r + "," + g + "," + b;
Clipboard.SetDataObject(command, true);
Thread.Sleep(500);
}
}
}
--- End code ---
I'm a server-side developer, not a GUI-guy so it's possible I've hosed something with my clipboard usage but it appears to be correct. Basically, this would throw an exception at some point due to the clipboard call. I believe it choked when the LED-Wiz software was reading the clipboard at the same time. I tried various delay differences, but it never really worked properly.
Rather then get hung up here, I just re-wrote the whole thing in Java. Looks something like this:
[code]
package com.testing;
import java.awt.datatransfer.*;
import java.awt.*;
public class LedGlowieThingee implements ClipboardOwner
RandyT:
Ok, the first thing is the clipboard. You can't have it when something else is using it. Instead of waiting 500ms between sending commands to it, check the status of the clipboard (with error trapping just in case) and only send a new command if the clipboard is empty. The resident software empties the clipboard when it finds and acts on a valid command. Your problems should go away after that.
Also, make sure the resident software isn't running when you are playing with the OCX. They are mutually exclusive.
On the other hand, if you can, just use the OCX and skip the clipboard.
Next problem.
The Profile commands are primarily for setting up the outputs, not turning them on and off. If you are looking for fast animation, use the state commands.
You can use the "profile" commands for animation, but don't try to send them at the same rate as you would a state command. The "profile" commands send 4x the data as the "state" command does. And when ever possible, use the commands labeled as "most efficient" in the docs.
The individual output manipulation commands are provided for convenience and will work great for fast and simple output manipulation. But if you want to control the states and settings of every one of the 32 outputs with one fast command, stick to the SBA and PBA commands.
Also, "0" is not a valid brightness setting. And if you set output 1 to a level of "20", don't forget to actually turn on the output so you can see it! :)
This may sound a bit odd at first, but in doing things this way, you can send a profile down to the LED-Wiz that will set up all the buttons to be specific colors (or pulse settings) and then very quickly manipulate them with the simple and fast state commands.
Let me know if any of this helps your situation.
RandyT
MikeQ:
--- Quote from: webgeek on December 27, 2005, 10:25:53 pm ---Many thanks to Randy for all the work he has put into this. I recieved my LED Wiz from him today. I've since wired it up to an RGB LED for experimenting. Many things have worked great, but I'm having trouble when I try to really get into it via code. First, I attempted to use the clipboard capabilities from C#. My code looks something like this (note that this is all badly hacked together for testing and then hacked more to take as little room as possible in here):
--- Code: ---for(int r = 0; r < 48; r++) {
for(int g = 0; g < 48; g++) {
for(int b = 0; b < 48; b++) {
String command = "LWZ-RGB:1," + r + "," + g + "," + b;
Clipboard.SetDataObject(command, true);
Thread.Sleep(500);
}
}
}
--- End code ---
--- End quote ---
I don't use c# so I can't say for sure, but under WIN32 api, you must lock access to the clipboard before setting or getting data.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version