Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
What type of bulbs are we talking about? AC incandescent, DC or LED?
You should not connect any light bulbs directly to any port. You might damage the I/O device. You can connect LEDs but must use a limiting resistor.
Actually, using the parallel port would probably be the easiest solution and the simplest program. The USB is strictly a data bus and would require additional hardware. Controling specific RS-232 data lines is harder then with a parallel port.
Unless the light bulb is very tiny, neither the serial port or USB interface is likely to be able to source enough current to illuminate it. You may be able to accomplish that with LEDs.
I would look into the perl module Sys::PortIO, which allows you write & read arbitrary IO addresses. You could use it control the Modem Control Register of a PC UART (and thus the related serial port control signals). You will need to dig into the documentation for 8250-style UARTs to decide which lines are appropriate for your purpose. There is a fairly small and standard list of IO addresses used by serial ports on PC compatibles.
i've done some googling, but not much luck. I'd like to use a real regular light bulb. The bulb doesn't have to get its power from the pc, just controlled.
How much hardware are you prepared to build or buy? There are a few ready-made systems that you can buy that connect to various PC ports. My preference would be a solid-state relay with zero-crossing detection that has TTL level inputs and 120VAC contacts. These could easily be controlled from a parallel port using Sys::PortIO. If you are planning to build your own, the software side will be a small part of the overall project.