Shop OBEX P1 Docs P2 Docs Learn Events
The Spinneret workaround — Parallax Forums

The Spinneret workaround

ProcessingData...ProcessingData... Posts: 208
edited 2011-06-29 19:15 in Propeller 1
Today I found myself with enough money to buy a Spinneret.
Unfortunately, I'm off to a Family Reunion in a few days, and wouldn't be at home if I ordered it now. :tongue:

Pining away for a Spinneret, I did the next best thing:
I made a socket listener using a bit of Python, and hooked it up to the serial port on my computer!

The Server is here: http://propeller.dyndns-ip.com:5007

Here is a link to the code for the Python Socket listener (it requires the pySerial module):
http://dl.dropbox.com/u/22048762/main.py

and Attached is the spin code for the server on the propeller.
Enjoy!

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-06-28 19:28
    Geez! I thought HTTP servers were easy in Perl, but Python looks even easier! The Serial module results in shorter code, too. 'May be time to learn a new language!

    -Phil
  • ProcessingData...ProcessingData... Posts: 208
    edited 2011-06-29 08:12
    Yes, It is easy. I spent about 45 minutes on the whole thing.
    I've never tried to implement an HTTP server before, so this was a first for me.
    I've found Python to be very useful and versatile, and Spin takes after many of it's best features.
  • $WMc%$WMc% Posts: 1,884
    edited 2011-06-29 18:24
    Pro-Data
    '
    Well done.
    '
    45 Minutes is what I'm taking about.
    '
    I might have to take a second look at Python.
    '
    Thanks for sharing
  • ProcessingData...ProcessingData... Posts: 208
    edited 2011-06-29 18:51
    You're welcome, $WMc%!
    I'm glad that my work is of some use!
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2011-06-29 19:15
    Awesome workaround! Nice way to give folks a taste of Spinneret power!

    OBC
Sign In or Register to comment.