MadSci Network: Computer Science |
Dear Friend,
I like this question, because I've recently been experimenting with precisely what you are asking about! It's EASY to create an "accessory" to your computer. I must warn you, however: it's addictive!
First of all, you probably could just hook up a light to your parallel port. There are different ways of doing this, the silliest of which would be poking around with an LED until you hit the proper pins. (You could use your serial ports, too.) Of course, you'd have to turn your port(s) "on" first, and it would help to know which pins to try. Both of these things are easy to figure out if you look up "parallel port", "serial port", parallel or serial "communications", etc., on the web. You should find pin diagrams and basic communication routines aplenty. (Try this link for starters: http://www.geocities.com/TheTropics/Shores/2250/pinout.html)
However, please note I called that the "silliest" way of learning about this. You don't want to try it for 3 reasons:
For example, you could tell your computer to turn on a table lamp using something called "X-10" technology. (X-10 is a standard for interfacing computers with higher voltage devices. Here's a site which has some of these products: http://www.smarthome.com/x10map.html ) You could control your thermostat, turn on your stereo, TV, etc.. In fact, you could do this remotely, over the telephone, as most X10 units have a"DTMF" option. (DTMF=Dual Tone Multi Frequency. It's a code used on your phone line. You can't hear half of it, but your computer can hear all of it, if you buy the right stuff. Learn more here: http://www.whatis.com/dtmf.htm) Your computer could "learn" to answer the phone, set the temperature, turn on the music & mood lighting for a "special evening", etc. It could also monitor your fire alarm, burglar alarm, etc. In short, you could make your house into a "robot", controlled by your PC.
Did somebody say "robot"?
You can REALLY control robots from your PC! Your OWN robots! You just need a little patience, and some curiosity. A little cash helps, too. (Check it out!: http://www.robotstore.com/ ) What you want to look for is a way to get your computer to "talk" to something -like an X10- which can control another device. In this case, however, you want to control something other than a lamp, or, thermostat. You want to do MORE than "on/off". What you want is a micro-controller. It's kind of a "baby" one-chip computer which can "talk" to your PC. You may need to learn a little programming, and have suitable interface hardware and software. (That's where the patience and cash come into play.) Fortunately, these are readily available for folks of all skill levels. You can get into this for well under $100, and the programming is often pretty intuitive Here are some micro-contollers I've found/bought: http://www.parallaxinc.com/company/, http://www.controlled.com/pic.html. Here's a site with some sample code for you : http://www.doc.ic.ac.uk/~ih/doc/pic/ . And, DON'T EVEN miss this one!: http://www.lego.com/ (See the "Products" page in the "Mindstorms" section.)
What else can you do? The sky's the limit! I'm getting interested in model rocketry again, and I've just found a little interface I could put on a rocket. It will record flight data and dump it to my PC. In turn, I can tell the board what to look for, what delays to use, etc.. The board isn't cheap, but it is a lot less expensive than lofting my PC!
There are other ways of approaching this, too. Say you wanted to control a programmable oscilloscope…like I did… using your computer. You could do this two ways:
Long story short, you can get your PC to do almost anything for you, if you know how to get it to "talk" to other machines. (Just think about your modem & internet connection. Easy, eh?) You just need the right hardware and software.
I hope this has given you a start on learning how to do what you are asking about. If you need to know more about anything I've mentioned, please feel free to e-mail me at mwnet@swbell.net. I like to help!
Your MadSci,
-Matt
Try the links in the MadSci Library for more information on Computer Science.