| Main > Main Forum |
| LED-Wiz USB LED and Output Control Device now available. *Blinky lights* |
| << < (47/92) > >> |
| webgeek:
Thanks for all the input everyone. The clipboard problem was simply that my code wasn't respecting any other programs access to the clipboard. I was able to fix it easily enough but I like the OCX more. Now that I understand that you have to enable the output first before you can use it, things are working great :) My new OCX code executes this first (for one RGB LED): LWZ-SBA:7,0,0,0,1 Then I execute this: LWZ-PBA:20,20,20,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 This does what I expect now. Assuming I wanted to make my RGB LED from one color to another, it seems that I would be required to use profiles or am I missing something? Thanks for a great product and all the help! Mike |
| webgeek:
Doh! I take it back, at first glance, it seems to work but I'm certainly having problems still. Here is the OCX code: --- Code: ---LED_Wiz1.Command = "LWZ-SBA:7,0,0,0,1"; Thread.Sleep(50); for(int r = 1; r <= 48; r++) { for(int g = 1; g <= 48; g++) { for(int b = 1; b <= 48; b++) { LED_Wiz1.Command = "LWZ-PBA:" + r + "," + g + "," + b + ",1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"; Thread.Sleep(500); } } } --- End code --- This KINDA works. Most the time, the LED has all of it's colors at the lowest setting except every couple of iterations, it will blink temporarily to the correct color and then go back to 1,1,1 (at least that's what it looks like). Changing the sleep delay has some impact but not that much and no matter what I set it to, it never works as I would expect. Anyone have any ideas with what I've got screwed up now? Thanks :) Mike |
| RandyT:
Forgive my ignorance to the language you are using, but are the integer variables r, g and b actually resolving to a string the way that is written? And if so, are they coming through without extra spaces? Also, by putting the thread to sleep, how is it affecting the rest of the code? You may wish to re-write that using timers rather than stalling the thread. RandyT *edit* I just knocked out a VB version of that program using the OCX and it works perfectly. I set up the LED-Wiz command and RGB increments inside a timer with a 20ms interval. Currently cycling through all 100,000+ color possibilities :) *edit2* Just modified the program to send a random number between 1 and 48 to each of the outputs at 15ms intervals. Trying to push the OCX and the hardware. Been working fine like this for the last 15 minutes. Looks like 32 independently flickering candle flames. |
| Roughy:
Stop it until you're ready to share and let me do what I want via a GUI front end. I want this damn thing so bad and hate you all. (seriously, though... keep up the good work!) [Edit] Oh, and ummm... I'm kind of a design/usability guy. I'm happy as hell to really help with a GUI for this type of thing. |
| webgeek:
Gah! I'm still not having any luck at all. I re-wrote the OCX program a bit to use a timer instead of pausing the event thread. Still no go, the effect is the same. I then coded it up so I can actually flag which commands appeared to work and which didn't. Currently, it sends this command initially: LWZ-SBA:7,0,0,0,2 And then when you push the "start" button, it kicks off the timer and starts sending random values (1-48) for the first three inputs. I have another button that I push to flag a command as one that appeared to work. This let me generate a list of good commands and bad commands. One sample run looks like this: Good Commands 5. LWZ-PBA:3,34,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 11. LWZ-PBA:27,48,26,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 16. LWZ-PBA:44,40,36,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 26. LWZ-PBA:20,45,38,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 36. LWZ-PBA:13,11,23,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 41. LWZ-PBA:17,11,17,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 44. LWZ-PBA:43,42,29,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 -=-=-=- Bad Commands 1. LWZ-PBA:17,20,21,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 2. LWZ-PBA:11,27,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1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BA:7,38,41,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 35. LWZ-PBA:17,14,8,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 37. LWZ-PBA:46,1,43,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 38. LWZ-PBA:19,21,19,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 39. LWZ-PBA:39,39,35,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 40. LWZ-PBA:19,25,31,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 42. LWZ-PBA:45,15,37,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 43. LWZ-PBA:27,20,21,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 The number to the left is what order the command was attempted. No, that number isn't being sent to the OCX. To make things more interesting, I went ahead and wrote another program that only sends commands that worked before and were flagged as such. No luck there either. The success rate was about the same. It doesnt appear that the specific values have any effect at all, it just sometimes works but usually doesn't. BTW: This program is written in C# with .NET 1.1. Personally, I hate VB, but if that's what I have to use, so be it. Randy, are you using VB.NET for your code? And if so, what version? I'm wondering if the problem occurs when .NET wrappers the ActiveX control... Thanks! Mike [Edit] Just noticed the VBP file under the OCX folder. I've gone ahead and let Visual Studio migrate it to .NET 1.1 automatically. Same problem. The PBA commands sometimes work and sometimes don't, just as before. Looks like the wrappering .NET uses for the OCX might be the problem. Sadly, I'm very inexperienced in this regard as I'm primarily a server-side developer (and not even in .NET ;)). Looks like it's back to the clipboard for me unless someone can shine some light on this. Thanks! |
| Navigation |
| Message Index |
| Next page |
| Previous page |