0

I need to control a LED light from a computer program that I am writing, i.e. I want to turn that light on or off from the computer. Is there some kind of power switch or alike that I can connect to from a computer, e.g. its USB port?

1
  • 1
    There are smart lights but if you have a specific device Arduino with a WiFi and relay plugins may be the way to go, Shopping questions are off topic but ideas on how to should be ok.
    – Ed Beal
    Mar 16 '20 at 14:49
1

There is a whole world of home automation products that are designed to be computer controlled. Search for "Smart Switch" and you will be overwhelmed with choices and dismayed at the confusing array of options.

Some can be controlled directly over WiFi, others require a "hub" which your computer talks to that then relays the command to the switch.

Buying guides are strictly off-limits here at SE, and a tutorial on HA is way beyond my capabilities and what would fit into an answer box. However, just a little bit of searching will also help you find the various pieces of software available to control the switches and, in many cases, the APIs to allow you to write your own code to do so if that's what's necessary for your use case.

0

About 20 years back, I built a set of race control lights for my sailing club, which ran six 300 watt spotlights for signalling boats on the water, plus a horn control, and a push button input to record finishing times. I bought a control box off the web for around 80 bucks, which had 4 input channels and 8 outputs (all 240V relays, insulated from the control box), with a serial port control interface. I know they now do a USB version. Simple protocol -- I wrote a Borland C App which set off a timed start sequence for a race so the race officer could concentrate on the sailing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.