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.

Poll Of The Day

My Books

Robotics Programming 101

Robotics Programming 101

Robotics Programming 101 shows how program a real robot, speech, vision, more...

Ubuntu Robotics - A Robotics Programming 101 Extra

Ubuntu Robotics - A Robotics Programming 101 Extra

This extra highlights all of the Ubuntu specific robotics configuration details in Robotics Programming 101.

Only $0.99 on Amazon.Com

Motion Detection - A Robotics Programming 101 Extra

Motion Detection - A Robotics Programming 101 Extra

This extra shows you how to write a motion detector for your robot with a network or web camera.

Only $0.99 on Amazon.Com

The Definitive Guide To Building Java Robots

The Definitive Guide to Building Java Robots

This was my first book on robotics and using the Java Language to interface between sensors, motors and microcontrollers with a PC capable of doing speech and vision.