Shop OBEX P1 Docs P2 Docs Learn Events
Web server modules — Parallax Forums

Web server modules

OrionOrion Posts: 236
edited 2004-12-05 05:32 in BASIC Stamp
I'm currently looking for a web server for a basic stamp project.· Has anyone used the SitePlayer from www.siteplayer.com or any others?· There doesn’t seem to be a lot of examples out there interfacing the basic stamp to web pages.·
·

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2004-09-07 23:06
    Not sure if this is what you're looking for...But Parallax has a Web Server module for the BS2...

    http://www.parallax.com/detail.asp?product_id=30005



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Knight Designs
    324 West Main Street
    P.O. Box 97
    Montour Falls, NY 14865
    (607) 535-6777

    Business Page:·· http://www.knightdesigns.com
    Personal Page:··· http://www.lightlink.com/dream/chris
    Designs Page:··· http://www.lightlink.com/dream/designs
    ·
  • OrionOrion Posts: 236
    edited 2004-09-08 01:05
    To give you a little background on this project I have a security camera system for my home. It feeds video in from several cameras into a PC that runs motion detection then stores the pics in folders. From there I have written web pages in php to serve up live views, past images and such. Now I want to include a simple control system to control things in my house. Currently I have my underground sprinkling and fish tank under BS2 power and need a way to pass settings to and from the camera pages. While the Red-I module looks like a great but I have two problems with it. First it’s not easily integrated into my current pcb and I do not want another pcb rigged onto my own. It would be nice if it had an OEM option. Second is cost. Granted it has better specs then site player however neither will more than likely have enough variable/page space. I have some work around ideas such as using 2(or more) vars one for address and second for data and move the data from PC - web module - BS - external eeprom memory and use nothing but the simplest web page on the stamp. Since I already have a PC running a web server this makes since.



    BTW.. BS2 memory is full after 3 months and the BS2p is coming tommarow smile.gif
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2004-09-08 01:44
    Orion said...(trimmed)
    BTW.. BS2 memory is full after 3 months and the BS2p is coming tommarow smile.gif
    Don't forget to change any timing constants that may need to be changed when switching, unless you've used Jon's conditional compiler directives.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Knight Designs
    324 West Main Street
    P.O. Box 97
    Montour Falls, NY 14865
    (607) 535-6777

    Business Page:·· http://www.knightdesigns.com
    Personal Page:··· http://www.lightlink.com/dream/chris
    Designs Page:··· http://www.lightlink.com/dream/designs
    ·
  • Fe2o3FishFe2o3Fish Posts: 170
    edited 2004-09-08 06:26
    Orion,
    You can bounce your SitePlayer questions to me offline (because the
    SP is a competing product) if you'd like.
    A few points to make:
    • The SitePlayer (SP) uses an 8051 from Phillips.
    • You have about 48K of memory shocked.gif inwhich to put your web pages,
      graphics files, and Java applets.
    • Webpages can not be changed on-the-fly.
    • The SP can not be "programmed" in the sense of a procedural
      language like C or Java nor assembler.
    • Data from UDP packets, web page forms, and URLs can be sent
      out the serial port or the I/O bits.
    • Data can be written/read via commands on the serial (usually the
      way to interface your h/w's CPU)
    • UDP packets can be sent from the SP from commands on the serial
      port.
    • I like to think of a SP as a whiteboard that can be written/read to
      from both the web interface and the serial port.
    I've been playing er, tinkering with them since they started shipping
    so fire away with your questions. They're pretty useful if you understand
    their limitations.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    -Rusty-
    --
    Rusty Haddock = KD4WLZ = rusty@fe2o3.lonestar.org
    **Out yonder in the Van Alstyne (TX) Metropolitan Area**
    Microsoft is to software what McDonalds is to gourmet cooking
  • DonRDonR Posts: 6
    edited 2004-09-08 07:05
    Are you running your own web server now, is it local?

    If so can you access your serial port thru php code?

    If this was an IIS server I would code an asp page to create your web page and have it talk to the stamp for your control items.

    ··
  • OrionOrion Posts: 236
    edited 2004-09-10 00:13
    Fe2o3Fish,
    ·
    My question is not really siteplayer specific. Just wondering what was available and any opinions anyone had on them.· Basically I'm looking for something that can generate a web page with the following:
    ·
    Read Address
    (text box)
    Read Result
    (text box)
    ·
    Write address
    (text box)
    Data
    (text box)
    ·
    Submit button
    ·
    No pictures, graphics of any kind, less html the better.· Then use php on my web server to pull in these pages and create the final web page.· The Basic Stamp polls the web module for changes. If a read address is found retrieve the data @ that location from external memory and pass it to the web server module which will generate the something like the above.· With php I use query strings to set vars?
    Example
    ·
    http://xxx.xxx.xxx.xxx/sample.spi?ReadAddress=F0F0
    or
    http://xxx.xxx.xxx.xxx/sample.spi?WriteAddress=F0F0&data=0CB0.
    ·
    This is what I’m trying to accomplish at least, yet not sure as to what modules are best suited for this. This way if I have a need for multiple stamps, everything is coming on TCP/IP and easily transported since I have cat5 and wireless everywhere @ home.· Also I have so many variables now that none of these modules will be able to create the complex pages wanted.· I have a web server now that works with 4GB of pics now why bother these simple machines with complex page creation.·
    ·
    As for the web server DonR, it is running Apache with PHP/MySQL and is local.· I will probably end up using a serial connection if this will not work over TPC/IP.· I can see in the future having them in a remote location with dial-up to connect to my home.· PHP as far as I know cannot connect to the serial port, I could be wrong though.
    ·
  • Fe2o3FishFe2o3Fish Posts: 170
    edited 2004-09-10 05:53
    Here's a few links to investigate...

    Siteplayer, which you already have. This should easily do what you want.
    Xipher - www.xipher.com (alas, it appears that they've changed their website
    to something less useful)
    TINI - but this could be total overkill www.maxim-ic.com/TINIplatform.cfm
    Rabbit - rabbitsemiconductor.com/

    and here's an interesting board I just found:
    microcontrollershop.com/product_info.php?cPath=98&products_id=558
    It's a Microchip PIC Ethernet Board.

    Poke around some more, I'm sure you'll find something that may suit you.

    -Rusty-

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    -Rusty-
    --
    Rusty Haddock = KD4WLZ = rusty@fe2o3.lonestar.org
    **Out yonder in the Van Alstyne (TX) Metropolitan Area**
    Microsoft is to software what McDonalds is to gourmet cooking
  • cbtruettcbtruett Posts: 2
    edited 2004-12-02 23:15
    Hi there, I have a SitePlayer question -

    I want to send serial data from the stamp to siteplayer and have siteplayer display it on my siteplayer HTML page.
    I know this must be unbelievably simple but I'm lost.

    Do you know what I need to do on the siteplayer side? is there an object associated with receiving serial data?

    Thank you so much for your help, I'm having such a rough time with this.

    Charles


    Fe2o3Fish said...
    Orion,
    You can bounce your SitePlayer questions to me offline (because the
    SP is a competing product) if you'd like.
    A few points to make:
    • The SitePlayer (SP) uses an 8051 from Phillips.
    • You have about 48K of memory shocked.gif inwhich to put your web pages,
      graphics files, and Java applets.
    • Webpages can not be changed on-the-fly.
    • The SP can not be "programmed" in the sense of a procedural
      language like C or Java nor assembler.
    • Data from UDP packets, web page forms, and URLs can be sent
      out the serial port or the I/O bits.
    • Data can be written/read via commands on the serial (usually the
      way to interface your h/w's CPU)
    • UDP packets can be sent from the SP from commands on the serial
      port.
    • I like to think of a SP as a whiteboard that can be written/read to
      from both the web interface and the serial port.
    I've been playing er, tinkering with them since they started shipping
    so fire away with your questions. They're pretty useful if you understand
    their limitations.
  • -Karl--Karl- Posts: 1
    edited 2004-12-04 02:11
    If you google for "serial device" "php" you will find a number of sites. This one looked particularly easy to use:
    http://www.easyvitools.com/articles/webscript.html

    Good luck!

    Karl
  • Fe2o3FishFe2o3Fish Posts: 170
    edited 2004-12-05 05:32
    cbtruett said...
    Hi there, I have a SitePlayer question -
    OK. smile.gif
    cbtruett said...
    I want to send serial data from the stamp to siteplayer and have siteplayer display it on my siteplayer HTML page. I know this must be unbelievably simple but I'm lost.

    Do you know what I need to do on the siteplayer side? is there an object associated with receiving serial data?
    Charles,
    If you're expecting the Siteplayer to simply capture whatever you put onto
    its serial port then you will be sorely disappointed since the SP is not capable
    of this. For data via the serial port to be put into SP objects you'll need to
    enter this data with SP serial commands as explained in the documentation.
    For instance, to set an SP object at address $0123 that's been declared to be
    a two-byte integer with a value from your BS (say $5678), you'll need to send
    the following byte stream from your BS to the SP:

    $91 $23 $01 $78 $56

    $91 --> WriteX cmd. (use 2-byte address for destination) $90 + 2 (bytes to write) - 1
    $23 --> LSB of the address
    $01 --> MSB of the address (oh, MSB/LSB -> Most/least Significant Byte)
    $78 --> LSB of the data (or [noparse][[/noparse]data AND $00ff] )
    $56 --> MSB of the data (or [noparse][[/noparse]data AND $ff00] / 256 )

    It will probably look something like this in PBASIC for a BS2:

    SPpinOut   PIN   1
    T9600       con   16468   ' 9600-bps, 8N1, non-inverting for SP, I think
    
    SEROUT SPpinOut,T9600. [noparse][[/noparse]$91,$23, $01, $78, $56]
    


    Further Siteplayer questions can either be sent to me directly or you're welcome
    to join the Siteplayer group on Yahoo.

    Apologies for the ugly PBasic. I'm not THAT fluent and I'm currently rebuilding a
    PC and haven't installed the Parallax nor Siteplayer software/documentation yet.

    If the T9600 value doesn't work, lemme know and I'll do a "Jon" and wire up a
    Siteplayer with one of my BS2's for you and get you all the details, from PBASIC
    code to wiring diagram. smile.gif

    cbtruett said...
    Thank you so much for your help, I'm having such a rough time with this.

    Not a problem.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    -Rusty-
    --
    Rusty Haddock = KD4WLZ = rusty@fe2o3.lonestar.org
    **Out yonder in the Van Alstyne (TX) Metropolitan Area**
    Microsoft is to software what McDonalds is to gourmet cooking

    Post Edited (Fe2o3Fish) : 12/5/2004 5:35:10 AM GMT
Sign In or Register to comment.