So once you have your device and your LED (or lamp) the next thing you need is the software to drive it. Try typing something like "PC digital IO boards" You might also try adding "low cost" or "cheap" if the items you find initially are a little on the pricy side.
How to make a computer program in c++ serial#
Popular modern options include PCI cards and serial or USB devices that provide digital I/O lines and other I/O functions - often with their own microcontrollers. For example you could use one of a serial ports handshaking lines as your digital output then use the serial I/O support APIs in your operating system to change the state of this line - see for example the Win32 API function EscapeCommFunction under Device IO of the Microsoft 32-bit Windows Platform SDK (see ). Of course if you are good at electronics then maybe you can concoct a simple device to work with a serial or parallel port.
How to make a computer program in c++ drivers#
Your best bet is probably to purchase a separate I/O board or device and hope that it comes with drivers and SDK for your operating system (you can of course check this in the product description). PCs for example have PC style I/O - serial, parallel, PS/2, USB, Firewire, IDE, Ethernet etc, as well as PCI slots for boards. What options are available depend on the system in question. Alternatively you could purchase some sort of industrial I/O board. Generally such devices have a low voltage and current output so even turning on and off a LED will require some power electronics (a couple of resistors and a small general purpose transistor such as a BC109). The most obvious method of turning a bulb on and off is to change the state of a bit representing the state of an output line in the I/O device in question. How you would go about doing such a thing also depends on the programming model of the I/O device you need to talk to. Normally you rely on the services of other functions of the operating system, system monitor or software development kit (SDK) provided for the device for use on the platform in question. There is _no_ direct support for controlling I/O devices in C++. Please give me a programming example and concept ,atleast for swithching On/Off an electronic bulb with the help of programming language. What additional skill and devices are required for activating any electronic devices with the help of c++ programming.