USB Light w/ .NET Code

Posted on 2004-11-01
Medium Priority
Last Modified: 2010-08-05
We're developing an application which requires a small light to be controlled by a PC running Windows XP.  We're looking at our options in terms of connections and power supply.  Our first prototype was controlled via the serial port, but required a wall plug.  We're trying to reduce cost and outlet usage, so we need an alternate strategy.

What do I need to know in order to prototype a USB controlled light.  From my preliminary research, it looks like a USB 2.0 bus provides enough power to light up our light sufficiently.  What do I need to do to get a light controlled via USB and what requirements do I have in my software to do said controlling.

Question by:a_goat

Accepted Solution

passmark earned 2000 total points
ID: 12469676
Controlling a serial port is easy, but Windows doesn't inculde any standard way of controlling USB devices. In most cases you'll need to write your own device driver.

This is what we did for our USB loop back plug,

But it depends on what control you need. If you just want to turn the light on or off, a simple physical switch will work.

If your prototype device works with a serial port then consider using the FTDI USB to serial converter chip. See,
It comes with its own device drivers and a very easy to use programming interface. To the end user it appears as a USB device but internally it couls still work as a serial device.


LVL 14

Expert Comment

ID: 12473020
Have u inquired abt a USB to Serial connector?? maybe that can solve your purpose. You will have to check the specs to see if the converter also has a pin which gives current which you can harness. Just an alternate thought if it can help you.


Featured Post

WEBINAR: GDPR Implemented - Tips & Lessons Learned

Join the WatchGuard team on Thursday, March 29th as we recount some valuable lessons learned in weighing the needs of a business against the new regulatory environment, look ahead at the two months left before implementation, and help you understand the steps you can take today!

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

In the modern office, employees tend to move around the workplace a lot more freely. Conferences, collaborative groups, flexible seating and working from home require a new level of mobility. Technology has not only changed the behavior and the expe…
For years I have put up with a wireless mouse that consistently disappears or is non-responsive.  This is the story of how I discovered it wasn't really the mouse!
How to fix display issue, screen flickering issue when I plug in power cord to the machine. Before I start explaining the solution lets check out once the issue how it looks like after I connect the power cord. most of you also have faced this…
Did you know PowerShell can save you time with SaaS platforms? Simply leverage RESTfulAPIs to build your own PowerShell modules. These will kill repetitive tickets and tabs, using the command Invoke-RestMethod. Tune into this webinar to learn how…

619 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question