Shop OBEX P1 Docs P2 Docs Learn Events
Remote web communication with the basic stamp w/ PINK? — Parallax Forums

Remote web communication with the basic stamp w/ PINK?

bshackbshack Posts: 13
edited 2007-05-07 05:38 in BASIC Stamp
What is the best way to communicate with the basic stamp/PINK network card remotely and automatically? So I can write a web app on a remote server that connects to the basic stamp/PINK and updates a variable on it automatically without human intervention?

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-05-04 21:15
    Hello,

    I don’t know about being the ‘best’ method, but one I have worked with is sending UDP packets between units. The BASIC Stamp can do whatever it wants with the data and communication with the PINK Module is simplified because you’re only dealing with a couple of variables. I hope this helps. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • bshackbshack Posts: 13
    edited 2007-05-04 21:29
    you wouldn't happen to have a php or coldfusion code example would you?
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-05-04 21:37
    We have example BASIC Stamp Code. =)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • bshackbshack Posts: 13
    edited 2007-05-05 17:37
    ok.. can you give me some code on how to ready the data recieved by the basic stamp? I tried the below but it did not work.



    NBVARUDP VAR Word

    DO

    SEROUT 8,396,[noparse][[/noparse]"!Nb_varST, bit 4"]
    SERIN 7,396,[noparse][[/noparse]DEC NBVARUDP]
    DEBUG DEC NBVARUDP

    HIGH 14
    PAUSE NBVARUDP
    LOW 14
    PAUSE NBVARUDP

    LOOP
  • boeboyboeboy Posts: 301
    edited 2007-05-05 20:03
    here is some code for controling a robot over the web with the PINK http://forums.parallax.com/showthread.php?p=631510

    Edit: I misspelled a wordfreaked.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    lets see what this does... KA BOOM (note to self do not cross red and black)
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-05-06 00:08
    Try the following code...This works but you may have to change the baud rate parameter and pins to match your setup.
    ' PINK_01.bs2
    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
    NBVAR VAR Byte
    SEROUT 15, 84, [noparse][[/noparse]"!NB0ST"]
    SERIN  14, 84, [noparse][[/noparse]NBVAR]
    DEBUG DEC NBVAR, CR
    STOP
    

    To get bit 4 you can reference NBVAR.BIT4· I hope this helps.· Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • bshackbshack Posts: 13
    edited 2007-05-07 05:38
    thanks!
Sign In or Register to comment.