Serial PC interface.
I'm hoping someone out there can point me in the direction of a good turn key solution. I've built a camera turret and temperature probe designed to connect to a camera at my friends beach house 300 miles away. The project is controlled via serial and that portion is working great.
My programing skills however are some what limited and I'm having trouble coming up with a simple low cost solution to remote com. I'm limited to a single windows box that is encoding the video from the camera. I currently can control the turret because I only need to send a serial command. I'm doing this right now by creating a text file with the serial command and then using the exec command in php sending the command "more textfile.txt >>com4". not pretty but it works solid. However I have two temperature probes connected and I've come up with now simple solution to remotely read them.
they are accessed by sending at serial command at 2400 n-8-1 of "!rto" and "!rti" (read temperature outside and inside respectively" The sx responds with 13, three ascii numbers, 13. I need a simple solution to send the read temperature command and get the string back.
Any pointers would be appreciated.
I've included the sx source in case anyone as suggestions for modification that would make for a more simple solution. BE aware it is still a work in progress. I've also included the really lame php file I wrote or controlling the servos on the turret.
Post Edited (natpie) : 9/2/2008 5:32:37 AM GMT
My programing skills however are some what limited and I'm having trouble coming up with a simple low cost solution to remote com. I'm limited to a single windows box that is encoding the video from the camera. I currently can control the turret because I only need to send a serial command. I'm doing this right now by creating a text file with the serial command and then using the exec command in php sending the command "more textfile.txt >>com4". not pretty but it works solid. However I have two temperature probes connected and I've come up with now simple solution to remotely read them.
they are accessed by sending at serial command at 2400 n-8-1 of "!rto" and "!rti" (read temperature outside and inside respectively" The sx responds with 13, three ascii numbers, 13. I need a simple solution to send the read temperature command and get the string back.
Any pointers would be appreciated.
I've included the sx source in case anyone as suggestions for modification that would make for a more simple solution. BE aware it is still a work in progress. I've also included the really lame php file I wrote or controlling the servos on the turret.
Post Edited (natpie) : 9/2/2008 5:32:37 AM GMT
Comments
Without too much hassle you could use an Lantronix XPORT module - essentially an ethernet to serial device ..you can also embed a webpage .
It simple to set up -
Assign an IP for it .. assign a port open the port on your router .. point it to the XPORT module..
Lantronix XPORT
also there is a similar Digi Module..
Digi Connect Me
Regards,
John
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
'Necessity is the mother of invention'
Those who can, do.Those who can’t, teach.
Post Edited (QuattroRS4) : 9/2/2008 8:36:16 AM GMT
I'll throw out another newb question on the Lantronics front.·· The XPORT is a 3.3v CMOS.· I seem to remember that the SX can read CMOS okay, and anything over 1.3ish·volts·(I don't recall the threshold) will count as High..· · The XPORT clames its serial connection is CMSO 5V tollerent.·· Does this mean I can send it a standard 5v TTL serial or do I need to do something extra to insure compatability?
5V tolerance means you can send it 5V signals from the SX. However, you can also run the SX at 3.3 volts, with the added bonus of lower power consumption.
Thanks,
PeterM