I have a project that I'm working on and I want to use these: http://www.woot.com/blog/post/usb-powered-woot-off-lights-2
However it looks like they just have on/off switches. They aren't something that you can interface with programmatically.
So I was thinking, if I could find a way to cut the power to the USB port, that would allow me to turn the lights on and off with my app. However I cant find any way to cut the power to the USB port. Is this possible?
The simple answer is no, if you remove power to that USB port it will not function as a USB port. Part of the specification is for power, and all devices plugged into a USB port expect power.
Solution. Initial troubleshooting should follow the on-screen directions: Disconnect all USB peripheral items, then Click the Reset button on the screen using the system touchpad and touchpad buttons. Once reset, it is recommended that you reboot the system then reconnect the USB device and see if the error re-occurs.
EDIT: unfortunately it seems the products from this company are not sold anymore.
The powered-woot-off-lights-2 are powered via a regular usb plug which mean they are 5 volts and there are in each one light and one motor.
I could not find how many Amps are needs but I know that this extension would be perfect if 200 mA for one powered-woot-off-lights is enough.
USB Controler Extension
The C# or VB.NET code would look like this.
// On
nusbio.GPIOS[NusbioGpio.Gpio0].DigitalWrite(true);
nusbio.GPIOS[NusbioGpio.Gpio1].DigitalWrite(true);
// Off
nusbio.GPIOS[NusbioGpio.Gpio0].DigitalWrite(false);
nusbio.GPIOS[NusbioGpio.Gpio1].DigitalWrite(false);
see Nusbio's website and I think the extension is in their store. I used a similar nusbio extension myself.
to turn on/off my a USB fan and a battery powered small lamp
I had a similar problem and solved it using DevManView.exe (freeware):
Download DevManView.exe and put the .exe file somewhere: http://www.nirsoft.net/utils/device_manager_view.html
Go to your Device Manager and figure out which USB-Controller you have to enable/disable, so that your device does/doesn't get power anymore. For me disabling "USB Serial Converter" does cut the power of all USB slots.
USB Serial Converter in device manager
In C#, create and start a new process for disabling the device (using the name of the USB-Controller).
Process devManViewProc = new Process();
devManViewProc.StartInfo.FileName = @"<path to DevManView.exe>\DevManView.exe";
devManViewProc.StartInfo.Arguments = "/disable \"USB Serial Converter\"";
devManViewProc.Start();
devManViewProc.WaitForExit();
And enable it again.
devManViewProc.StartInfo.Arguments = "/enable \"USB Serial Converter\"";
devManViewProc.Start();
devManViewProc.WaitForExit();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With