talking to the COM ports

Mark Hensler's picture

He has: 4,048 posts

Joined: Aug 2000

I'm working on a personal project with my cousin.... we're making our own RCM stuff (RCM = Robotic Camera Mount).

My cousin is the hardware guy and has made an awsome RCM. I am the programmer and have been able to write a VB app that sends serial data out the COM1 or COM2 ports (user specified) to his hardware (which is sporting some of his programed chips).

We want to take this another step and web enable it. He is running Apache at home, and has PHP installed. So idealy, I'd like to write a PHP script that sends stuff out the COM1 or COM2 ports. I haven't found anything yet. Anyone have any documentation I can read?

Mark Hensler
If there is no answer on Google, then there is no question.

Peter J. Boettcher's picture

They have: 812 posts

Joined: Feb 2000

Mark,

It's to bad you're not running an IIS setup, you could take your VB app compilie it as a dll then use it as a com component, with very little modification. I'm not sure how you would achieve this with PHP, but it should be possible.

PJ | Are we there yet?
pjboettcher.com

Mark Hensler's picture

He has: 4,048 posts

Joined: Aug 2000

I found this: http://www.zend.com/codex.php?id=114&single=1
It makes a Word object in PHP, so you can create Word files. Do you think that this uses the same file as ASP to make the object?

Mark Hensler
If there is no answer on Google, then there is no question.

Mark Hensler's picture

He has: 4,048 posts

Joined: Aug 2000

mission: accomplished

Well, sorta. I had to do it in a round about way....
HTML form is submited to a PHP script (CGI and ASP versions planned), which then sends data to an IP on a port.
I then made a VB app that listens to that port and takes in the data. The application then sends the data out the COM ports to the hardware, which then moves the RCM.

I kinda like this setup better, because I can add additional features to the VB app. But this method is also quite a bit harder because of all the mediums I have to go through. But the end result is the same, the cam moves from the web, so I guess it's all good.

This project is far from over. I've completed (half?) of a prototype application, and stoped. I've started a completely new application which I hope will be the version that we'll use.

Mark Hensler
If there is no answer on Google, then there is no question.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.