Serial Web Server

by Scott Preston - 2007-05-08 07:29:14
The program and batch file require the .Net Framework v3.0.
Once you download this file, unzip it, then open the .bat file and adjust the parameters. The included batch file used COM1 and port 5050, for http.

The commands are simple:

http://server:port/delay,byte,byte,....

So for an SSC I would send this:

http://localhost:5050/0,255,0,127

But if you would like a delay for reading sonar from a basic stamp you might try something like this:

http://localhost:5050/75,100,102

Where the 75 is a 75ms delay, the 100 is a byte for my basic stamp program below, and the 102 is the command byte telling my basic stamp to return the command.

SERIN 16,16468,main,[WAIT(100), cmd] 

I have also included a simple AJAX and PHP script that allows you to access these from a PHP and Apache.
Basically this allows you to copy the files to your Apache web server with PHP, then change the IP Addresses of your server, maybe to 127.0.0.1, or localhost, and you can now control your SSC powered remote from anyplace in the world.