Shop OBEX P1 Docs P2 Docs Learn Events
communicate through internet — Parallax Forums

communicate through internet

ArchiverArchiver Posts: 46,084
edited 2004-03-27 01:37 in General Discussion
Dear

I'm working on programing a bridge to rotate using my home board and basic stamp
2. to rotate it I used to type duration in the debug terminal.
Is there a way to contact the basic stamp through internet or using HTML files
or director program?

Khaled


Thank You

Khaled Sherbini
http://khaledsherbini.com

Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.

[noparse][[/noparse]Non-text portions of this message have been removed]

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2004-03-26 03:42
    There are actually many possible solutions out there. A newer, simpler, and
    cheaper method is the Lantronix XPort <http://www.lantronix.com/>. Whether
    or not its useful to you depends on some things - and these are questions
    you have to ask about any "internet" solution you look at:

    1) The Xport is a serial to internet device. Your stamp just talks to it as
    if it were a serial port. No HTML or anything required on the stamp itself
    (good feature really - low program overhead on the stamp). RX/TX is all that
    is required from the stamp - though it has three additional/optional I/O
    lines for special functions.

    2) The XPort has a built-in web server that can also serve up Java applets.
    All web pages and applets are stored in the Xport itself. The Caveat here is
    that there can be only ONE client talking to the stamp at a time. Multiple
    people can surf the Xport's web, but only one can "connect" through the
    XPort to the stamp at a time. Its not as bad as it sounds. You can connect,
    toss a message/response then disconnect and let someone else connect.

    3) The stamp cannot initiate a connection over the net. Only incoming
    connections are possible by default. The stamp just thinks its talking to a
    serial port and has no way to initiate a connection from its end. If you're
    a C programmer though, Lantronix has a Dev kit (NDA required) that lets you
    rewrite or modify the firmware. You could add extra bits in there to allow
    multiple simultaneous connections to the stamp itself.

    Just to be clear here. The Xport itself does no processing beyond serving up
    HTML and Java Applets. All dynamic content is a function of the java applet
    at the remote end talking to the stamp.

    There is a nice little demo of an internet accessable Thermostat that comes
    on the CD too. Makes it easy(er) to figure out how to write Java applets if
    (like me when I got mine) know zero about Java.

    If you want the stamp to initate net connections, you'll have to look at
    other products.



    >
    Original Message
    > From: Khalid Sherbini [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=V2F1hnuBS8kdbdyeB6kMvMOo7aZt60lt22y0yjAaR0koLw8M0rn62XBWMTjIhWdZY_7ayjyEL-ZYGMM]sherbinik@y...[/url
    > Sent: March 25, 2004 8:20 AM
    > To: basicstamps@yahoogroups.com
    > Subject: [noparse][[/noparse]basicstamps] communicate through internet
    >
    >
    > Dear
    >
    > I'm working on programing a bridge to rotate using my home board
    > and basic stamp 2. to rotate it I used to type duration in the
    > debug terminal.
    > Is there a way to contact the basic stamp through internet or
    > using HTML files or director program?
    >
    > Khaled
    >
    >
    > Thank You
    >
    > Khaled Sherbini
    > http://khaledsherbini.com
    >
    >
    > Do you Yahoo!?
    > Yahoo! Finance Tax Center - File online. File on time.
    >
    > [noparse][[/noparse]Non-text portions of this message have been removed]
    >
    >
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the
    > Subject and Body of the message will be ignored.
    >
    > Yahoo! Groups Links
    >
    >
    >
    >
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2004-03-26 08:07
    does any one know if this can be adapted to be the controll to the
    servo controll i made out fo the instruction kit(one similar to cnc
    controll) ? id also like the modem to be able to transmit a cameras
    data, i dont think for my aplication it would be nesacery to
    initiate from the controll, but im not sure how to go about the
    camera or what all is involved in the modem connection, drawings and
    other info greatly apreaciated, if any one has ideas please feel
    free to respond direct to me as its some times hard to keep up on
    here, use subject X MODEM , mailto:xsavior38@h...

    --- In basicstamps@yahoogroups.com, PatM <pmeloy@s...> wrote:
    > There are actually many possible solutions out there. A newer,
    simpler, and
    > cheaper method is the Lantronix XPort <http://www.lantronix.com/>.
    Whether
    > or not its useful to you depends on some things - and these are
    questions
    > you have to ask about any "internet" solution you look at:
    >
    > 1) The Xport is a serial to internet device. Your stamp just talks
    to it as
    > if it were a serial port. No HTML or anything required on the
    stamp itself
    > (good feature really - low program overhead on the stamp). RX/TX
    is all that
    > is required from the stamp - though it has three
    additional/optional I/O
    > lines for special functions.
    >
    > 2) The XPort has a built-in web server that can also serve up Java
    applets.
    > All web pages and applets are stored in the Xport itself. The
    Caveat here is
    > that there can be only ONE client talking to the stamp at a time.
    Multiple
    > people can surf the Xport's web, but only one can "connect"
    through the
    > XPort to the stamp at a time. Its not as bad as it sounds. You can
    connect,
    > toss a message/response then disconnect and let someone else
    connect.
    >
    > 3) The stamp cannot initiate a connection over the net. Only
    incoming
    > connections are possible by default. The stamp just thinks its
    talking to a
    > serial port and has no way to initiate a connection from its end.
    If you're
    > a C programmer though, Lantronix has a Dev kit (NDA required) that
    lets you
    > rewrite or modify the firmware. You could add extra bits in there
    to allow
    > multiple simultaneous connections to the stamp itself.
    >
    > Just to be clear here. The Xport itself does no processing beyond
    serving up
    > HTML and Java Applets. All dynamic content is a function of the
    java applet
    > at the remote end talking to the stamp.
    >
    > There is a nice little demo of an internet accessable Thermostat
    that comes
    > on the CD too. Makes it easy(er) to figure out how to write Java
    applets if
    > (like me when I got mine) know zero about Java.
    >
    > If you want the stamp to initate net connections, you'll have to
    look at
    > other products.
    >
    >
    >
    > >
    Original Message
    > > From: Khalid Sherbini [noparse][[/noparse]mailto:sherbinik@y...]
    > > Sent: March 25, 2004 8:20 AM
    > > To: basicstamps@yahoogroups.com
    > > Subject: [noparse][[/noparse]basicstamps] communicate through internet
    > >
    > >
    > > Dear
    > >
    > > I'm working on programing a bridge to rotate using my home board
    > > and basic stamp 2. to rotate it I used to type duration in the
    > > debug terminal.
    > > Is there a way to contact the basic stamp through internet or
    > > using HTML files or director program?
    > >
    > > Khaled
    > >
    > >
    > > Thank You
    > >
    > > Khaled Sherbini
    > > http://khaledsherbini.com
    > >
    > >
    > > Do you Yahoo!?
    > > Yahoo! Finance Tax Center - File online. File on time.
    > >
    > > [noparse][[/noparse]Non-text portions of this message have been removed]
    > >
    > >
    > >
    > >
    > > To UNSUBSCRIBE, just send mail to:
    > > basicstamps-unsubscribe@yahoogroups.com
    > > from the same email address that you subscribed. Text in the
    > > Subject and Body of the message will be ignored.
    > >
    > > Yahoo! Groups Links
    > >
    > >
    > >
    > >
    > >
    > >
  • ArchiverArchiver Posts: 46,084
    edited 2004-03-26 15:24
    hello,

    once you have perl installed, thinks should be easy.

    this is an example to make a dynamic page that reads a
    sensor and updates index.html ( the dynamic page)
    every 5 minutes. this is a minimalistic page that does
    not have validity checks for the function and it has
    not been tested because i am not writing from a PC
    with perl installed.

    (see my previous message on this forum tha explains
    how to use the COM port in perl)

    #*************************************************
    # file name: web.pl

    use Win32::SerialPort;

    #******** LOOP FOREVER ***************************

    $flag = 1;
    while( $flag )
    {

    #********* CALL READSENSOR FUNCTION **************

    $number = readsensor();

    #********** GENERATE a new index.html ***********

    open( OUTFILE, ">index.html");

    print "OUTFILE <html><head>";
    print "OUTFILE <title>sensor reading</title></head>";
    print "OUTFILE <body><center><p>\n";
    print "OUTFILE The sensor reading is: $number";
    print "OUTFILE </P></center></body>";
    print "OUTFILE </html>";

    close( OUTFILE );

    #*********** CLOSE LOOP FOREVER *******************

    sleep (60*5); # wait 5 minutes;

    }

    #*********** READ SENSOR DEFINITION ****************

    sub readsensor
    {

    (here you write a function that talks to the basic
    stamp through COM1. see my previus message)

    return $number;

    }

    #************ END OF PROGRAM ***********************

    to run the program type:

    perl web.pl

    with perl you can also do graphics on the fly. for
    example you could make a graph that shows the reading
    of the sensor on the webpage. you can send emails,
    etc...

    you can also use the library for the WWW. it is called
    LWP and will allow you to automate clien-server
    things.
    i'll lave that up to you.

    you will need a way to convert the +-12 volts of the
    PC to 5 volts. you need the max232 chip or use a
    usb-serial adapter (which should use a 5 volts
    output).


    good luck

    __________________________________
    Do you Yahoo!?
    Yahoo! Finance Tax Center - File online. File on time.
    http://taxes.yahoo.com/filing.html
  • ArchiverArchiver Posts: 46,084
    edited 2004-03-26 16:52
    Oop, one big point here. The Xport is not a modem. It requires that you plug
    it into an existing network. Didn't realize you wanted to go from the stamp
    through a dial-up connection. The Xport wont work for you if so.

    >
    Original Message
    > From: jutsuju [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=3gUmkCOijaAYIBjWP3dIT7eRKwiqrXWVVpMUTGmP1OHEAvsA57HzGmjUhLbLNCnehMd7ZKlDOyae3quAZUUk5g]xsavior38@h...[/url
    > Sent: March 26, 2004 12:07 AM
    > To: basicstamps@yahoogroups.com
    > Subject: [noparse][[/noparse]basicstamps] Re: communicate through internet
    >
    >
    > does any one know if this can be adapted to be the controll to the
    > servo controll i made out fo the instruction kit(one similar to cnc
    > controll) ? id also like the modem to be able to transmit a cameras
    > data, i dont think for my aplication it would be nesacery to
    > initiate from the controll, but im not sure how to go about the
    > camera or what all is involved in the modem connection, drawings and
    > other info greatly apreaciated, if any one has ideas please feel
    > free to respond direct to me as its some times hard to keep up on
    > here, use subject X MODEM , mailto:xsavior38@h...
  • ArchiverArchiver Posts: 46,084
    edited 2004-03-26 17:32
    Hello from Gregg C Levine
    One other thing, that you didn't mention. The XPORT is a 3.3v logic
    based device. Anything connected to it, will need to take that in to
    consideration. The people who make it, suggest studying the evaluation
    board's schematic first, before attempting to build anything around a
    bare device. I found that out the hard way, when I bought my "sample
    case" from Arrow Advantage, earlier in the month. But ideally once
    that hurdle is crossed it shouldn't be too hard to create a bridge
    between a Stamp, and an XPORT.
    Gregg C Levine hansolofalcon@w...
    "The Force will be with you...Always." Obi-Wan Kenobi
    "Use the Force, Luke."· Obi-Wan Kenobi

    >
    Original Message
    > From: PatM [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=tPT3vHNEbFJikkwB8U99lKDl1Ph50SJk7ESTA14HLBoN2IYyWzOBFLNRqHW-eHa2fhwUNzZ2JA]pmeloy@s...[/url
    > Sent: Friday, March 26, 2004 11:53 AM
    > To: basicstamps@yahoogroups.com
    > Subject: RE: [noparse][[/noparse]basicstamps] Re: communicate through internet
    >
    > Oop, one big point here. The Xport is not a modem. It requires that
    you plug
    > it into an existing network. Didn't realize you wanted to go from
    the stamp
    > through a dial-up connection. The Xport wont work for you if so.
    >
    > >
    Original Message
    > > From: jutsuju [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=avi4q6Ptam3xAhNhaaKL9swjcQyWPuLduRQxrwskkKjmkyA9QLOO8zKAWx0owWBQaG8auhWLTJ_tjCsOfzUOvA]xsavior38@h...[/url
    > > Sent: March 26, 2004 12:07 AM
    > > To: basicstamps@yahoogroups.com
    > > Subject: [noparse][[/noparse]basicstamps] Re: communicate through internet
    > >
    > >
    > > does any one know if this can be adapted to be the controll to the
    > > servo controll i made out fo the instruction kit(one similar to
    cnc
    > > controll) ? id also like the modem to be able to transmit a
    cameras
    > > data, i dont think for my aplication it would be nesacery to
    > > initiate from the controll, but im not sure how to go about the
    > > camera or what all is involved in the modem connection, drawings
    and
    > > other info greatly apreaciated, if any one has ideas please feel
    > > free to respond direct to me as its some times hard to keep up on
    > > here, use subject X MODEM , mailto:xsavior38@h...
  • ArchiverArchiver Posts: 46,084
    edited 2004-03-26 17:53
    While it may be heresy on this group you might want to google siteplayer for
    a simple and inexpensive solution to your problem

    HTH

    Vic
    ________________________________________________________

    Victor Fraenckel - The Windman
    vfraenc1 ATSIGN nycap DOT rr DOTcom
    KC2GUI

    Home of the WindReader Electronic Theodolite
    Read the WIND

    "Victory at all costs, victory in spite of all terror, victory however long
    and hard the road may be; for without victory there is no survival."
    - Winston [noparse][[/noparse]Leonard Spencer] Churchill (1874 - 1965)

    Dost thou not know, my son, with how little wisdom the world is governed?
    -Count Oxenstierna (ca 1620) to the young King Gustavus Adolphus
  • ArchiverArchiver Posts: 46,084
    edited 2004-03-27 01:37
    --- In basicstamps@yahoogroups.com, "Gregg C Levine"
    <hansolofalcon@w...> wrote:
    > Hello from Gregg C Levine
    > One other thing, that you didn't mention. The XPORT is a 3.3v logic
    > based device. Anything connected to it, will need to take that in to
    > consideration.

    Yes, you are correct - I meant to mention it but forgot. I ended up
    using a 10k resistor on each line to the Xport then connecting a 3.3v
    zener from each line to ground. That clamps the XPort side of the
    line to 3.3v max and keeps current to a minicule minimum.

    Note: Its not technically required on lines that are outputs from the
    XPort but, just in case I accidently switch one of the inputs to an
    output high - I stuck them on there too. 3.3V is enough to register
    as high on the stamp pins. Just a little insurance!
Sign In or Register to comment.