I have a project guys pls help me.. i should Control the OFF and On of a LED that is connected in the serial port of the desktop computer and should be able to controll and access it tru other computer using tru website. software to controll the LED should be able to acces to other computer using the internet.
pls help me guys how can i do this.
pls suggest what should i need to learn to do this.. any sugestion pls... thnx..
godblessI have a project that i should control the LED conected in serial port of a desktop computer tru website?
I only know how to do this with the parallel port, sorry
see this page to control parallel port over web
http://www.epanorama.net/circuits/parall鈥?/a>
Files here:
http://www.epanorama.net/circuits/lptout鈥?/a>
Not what you asked for but this is how I did it.
I also wrote a simple web server in VB to serve a controlling page and access the port
Here is one of my interfaces to the VB .exe server/port controller
http://dumdum.mark.googlepages.com/led.h鈥?/a>
View Source, save %26amp; change the IP it calls
Download my ledcgi.exe that it calls here:
http://dumdum.mark.googlepages.com/ledcg鈥?/a>
stick it in a cgi-bin in a Windows box
You'll need to install inpout32.dll (see below)
and regsvr32 it
Ports in XP are blocked, so you will need this driver to access the p. port -- inpout32.dll
http://logix4u.net/Legacy_Ports/Parallel鈥?/a>
It's much easier to use the parallel port than serial port!
Once you can control the port over the web you can hack remote controllers and control toys that way. I had a 8 legged infra-red controlled spider walking around viewed by a webcam -totally pointless -just like turning LEDS on or off -but loads of fun. Where there are buttons to press you just hard wire them to the port.
Connect power relays and you can turn anything on or off.
Here is a program that enables you to test your LEDS in the parallel port:
http://www.geocities.com/lalimparallel/i鈥?/a>
!!!!!! !!!!!! !!!!! !!!!! !!!!!
N.B. I used opto-isolators( http://en.wikipedia.org/wiki/Opto-isolat鈥?/a> ) to ensure that I did not fry the parallel port card by trying to draw too much current. It's the card you need to worry about, not the things plugged in.
But for LEDS you can just use the current limiting resistors as described in first answer. Full details are in my links above.I have a project that i should control the LED conected in serial port of a desktop computer tru website?
A few things are missing from your question for me to make a final suggestion though I can point to you in the right direction.
You should take this project and split it in 3 steps. First step is to figure out how to get the LED to turn on and off. Once you can write a program that does that, you can easily call that program through CGI, PERL, PHP, ASP... you get the idea...
Assuming you're using Linux, writing data to the serial port is pretty straightforward. Poke around in the man pages and search the web for RS232 to get more info about serial communications.
If you're using windows, I suggest you check out the codeproject (http://codeproject.com) to see if they have any examples of writing to the serial port.
Finally, once you get the LED going, you need to figure out what you're going to use for your web interface. There are dozens of solutions ranging from simple script-type languages like PERL to complex applications written in C. Again, you pick which technology you want to use, and a couple quick web searches will get you your answers.
Hope this helps you out! If you need more help, please elaborate which platform (windows, *nix) and which languages you would prefer to write this in, and I'll give you more precise advice.
Oh, one more thing: Make sure you have a resistor in series with that LED or that it's rated to handle the power coming out of the serial port! Most serial ports run at 12V/10mA which can easily fry an LED if you're not careful...
Good luck
a.
Subscribe to:
Post Comments
(Atom)
No comments:
Post a Comment