Propeller as an HTTP server -No Spinneret Required!
ProcessingData...
Posts: 208
This July, I wrote a Spin Object that would allow you (through Python) to use any Propeller Chip with a Serial connection to a computer to act as an HTTP server.
Original Thread
It was thrown together in about 45 mins, and had quite a few bugs in it, as I found out.
These past few weeks I have revisited the code, adding support for GET variables, removing several bugs in the code, putting more comments into the code, and compiling a windows executable file of the Python script, so that users without Python can use it.
I've also added a brief explanation of HTTP (Hyper Text Transfer Protocol).
The only thing needed is a Computer with a Serial Port and Browser, and a Propeller with a Serial connection.
The Web page included with this Demo Server has a visitor counter, and a Form demonstrating how to use GET variables.
Cheers!
~ Proccessing Data
Original Thread
It was thrown together in about 45 mins, and had quite a few bugs in it, as I found out.
These past few weeks I have revisited the code, adding support for GET variables, removing several bugs in the code, putting more comments into the code, and compiling a windows executable file of the Python script, so that users without Python can use it.
I've also added a brief explanation of HTTP (Hyper Text Transfer Protocol).
The only thing needed is a Computer with a Serial Port and Browser, and a Propeller with a Serial connection.
The Web page included with this Demo Server has a visitor counter, and a Form demonstrating how to use GET variables.
Cheers!
~ Proccessing Data
Comments
Who knows.. maybe I help it get a little more attention.
OBC
I've updated the code in the attached .zip to have an MIT license.
This looks very useful indeed - thank you for its contribution!
T o n y
Maybe I make wrong assumptions but right mow this looks to me as replacing the tiny spineret webserver through a "big" PC.
Wouldn't it be easier to use the PC directly as it is part of the system?
Maybe I'm just not able to see the advantage of it. Except for the fun to let a propeller do the task.
best regards
Stefan
ProcessingData showed me how this worked at UPENE. It's pretty cool, I'll have to give it a run.
That is, once the ethernet portion is up and running, and installed, we can experiment with the prop part back on the bench without consuming another spinneret board.
The Python program is replacing the functionality of the WIZnet ethernet controller that the Spinneret uses...
Spinneret: Propeller <--> Serial Connection <--> WIZnet Ethernet Controller <--> Ethernet Connection
PD's Prg: Propeller <--> Serial Connection <--> Python Ethernet Controller <--> Ethernet Connection
There are pros / cons to each method.
May I suggest to change the headline from Propeller as an HTTP server -No Spinneret Required!
(which leads me to the conclusion that the prop will "serve" webpage-contents)
to
controlling/displaying propeller-IO-pins from a webpage through a python-bridging software
keep the questions coming
best regards
Stefan