Shop OBEX P1 Docs P2 Docs Learn Events
Serial PC interface. — Parallax Forums

Serial PC interface.

natpienatpie Posts: 35
edited 2008-09-07 16:46 in General Discussion
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

Comments

  • QuattroRS4QuattroRS4 Posts: 916
    edited 2008-09-02 08:28
    To facilitate remote coms:
    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
  • natpienatpie Posts: 35
    edited 2008-09-03 16:14
    Wow I can't belive how cheap those Lantronix Xports can be.·· I'm still interested in a strictly software solution if any one has sugestions.··My goal was to throw as little money into this project as possible.····

    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?
  • PJMontyPJMonty Posts: 983
    edited 2008-09-03 18:57
    natpie,

    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
  • natpienatpie Posts: 35
    edited 2008-09-07 14:40
    Ok one more quick related question. If I set the input pin on my sx to CMOS, anything above .7v will read as high and below .3v as low, as apposed to TTL where 2v and above is high and .8v and below is low. Have I interpreted this correctly?
  • JonnyMacJonnyMac Posts: 9,215
    edited 2008-09-07 16:46
    The CMOS threshold is 1/2 VDD.
Sign In or Register to comment.