Shop OBEX P1 Docs P2 Docs Learn Events
html question on PINK — Parallax Forums

html question on PINK

James AndersonJames Anderson Posts: 52
edited 2006-07-24 05:06 in BASIC Stamp
I cant view variables from my PINK! I typed

the value of var01 is : <nb_var01>

into the html code and the page works fine but nothing shows up in the spot where the variable should be.
any suggestions?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
There once was a lady named Bright
who traveled much faster than light
She departed one day in a relative way
and Returned on the Previous Night

Cheers,
Wannabe Ub3r Geek

World of Warcraft Website
Star Trek official website
Google (Man's best friend...)

Post Edited (wannabe uber-geek) : 7/20/2006 11:36:42 PM GMT

Comments

  • HarborHarbor Posts: 73
    edited 2006-07-21 04:20
    First, I'd change that to <Nb_var01> as it is in the app note. I don't have a specific memory that the PINK's lexical processing is case sensitive, but I wouldn't be a bit surprised.

    Then make sure you put something in variable one. Those are string variables, so a variable with nothing in it will show... well, nothing at all. The empty string we call it. A numeric variable in other contexts will show zero, but not a string variable.
  • James AndersonJames Anderson Posts: 52
    edited 2006-07-21 05:05
    i tried Nb instead of nb and the stamp is feeding the pink variables. Thanks for the suggestions though.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    There once was a lady named Bright
    who traveled much faster than light
    She departed one day in a relative way
    and Returned on the Previous Night

    Cheers,
    Wannabe Ub3r Geek

    World of Warcraft Website
    Star Trek official website
    Google (Man's best friend...)
  • HarborHarbor Posts: 73
    edited 2006-07-21 05:49
    Great. Glad we could help.
  • James AndersonJames Anderson Posts: 52
    edited 2006-07-21 16:06
    i tried the above methods but the problem still persists.
    any ideas? I verified that the PINK is receiving the variables with telnet and
    the variables show up fine on the factory variable page.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    There once was a lady named Bright
    who traveled much faster than light
    She departed one day in a relative way
    and Returned on the Previous Night

    Cheers,
    Wannabe Ub3r Geek

    World of Warcraft Website
    Star Trek official website
    Google (Man's best friend...)
  • HarborHarbor Posts: 73
    edited 2006-07-22 01:49
    I'm not clear where you stand right now, wannabe. Didn't you say the code worked when you changed the variable reference to <Nb_var01>? What is the problem that still persists.
  • quispqixquispqix Posts: 64
    edited 2006-07-22 13:44
    ' PINK_02.bs2
    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
    NBVAR VAR Word
    DO
    SEROUT 8,396,[noparse][[/noparse]"!NB0R01"]
    SERIN 7,396,[noparse][[/noparse]STR NBVAR\16\CLS]
    DEBUG "register 01 ", STR NBVAR
    SEROUT 1, 16780, [noparse][[/noparse]30]
    SEROUT 1, 16780, [noparse][[/noparse]"hello register ", STR NBVAR]
    SEROUT 1, 16780, [noparse][[/noparse]31]
    SEROUT 1, 16780, [noparse][[/noparse]"quispqix telnet server VT-100"]
    LOOP

    This above reads the PINK variable register 01 and prints the value in DEBUG and on my vt100

    This one below writes my name to register 01:

    ' PINK_03.bs2
    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
    SEROUT 8,396,[noparse][[/noparse]"!NB0W01:curtis",CLS]
    END

    This in html:

    <html>
    <FORM method="post" action="/test01.html">
    <P>
    What value would you like stored in variable 01?
    <INPUT name="Nb_var01"type="text"size="24"maxlength="63">
    <INPUT type="submit">
    </P>
    </FORM>
    </HTML>

    and this reads in html:

    <html>
    The value in variable 01 is: <Nb_var01>
    \</html>

    The PINK is very powerful.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    It is better to burn out than to fade away,... Because rust, never sleeps!
  • James AndersonJames Anderson Posts: 52
    edited 2006-07-23 20:33
    i tried quispqix's code, but it still will not output a variable.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    There once was a lady named Bright
    who traveled much faster than light
    She departed one day in a relative way
    and Returned on the Previous Night

    Cheers,
    Wannabe Ub3r Geek

    World of Warcraft Website
    Star Trek official website
    Google (Man's best friend...)
  • James AndersonJames Anderson Posts: 52
    edited 2006-07-23 23:38
    it works now...but i am coding the bs2 to read the variable and display it on a 2x16 serial lcd but its not working.
    my coding is attached.

    any ideas?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    There once was a lady named Bright
    who traveled much faster than light
    She departed one day in a relative way
    and Returned on the Previous Night

    Cheers,
    Wannabe Ub3r Geek

    World of Warcraft Website
    Star Trek official website
    Google (Man's best friend...)

    Post Edited (wannabe uber-geek) : 7/23/2006 11:43:29 PM GMT
  • quispqixquispqix Posts: 64
    edited 2006-07-24 03:05
    On the PINK, make sure your voltage is exzactly 5.0Volts... Even when you use a battery eliminator! mine does not work over or under voltage. my meter is reading 4.83V on the PINK! The BS2 will work from 5-15Volts, but the PINK will not. Also I output to a serial terminal. But that's not your problem. nono.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    It is better to burn out than to fade away,... Because rust, never sleeps!

    Post Edited (quispqix) : 7/24/2006 3:18:02 AM GMT
  • James AndersonJames Anderson Posts: 52
    edited 2006-07-24 05:06
    slight misunderstanding..the html code is working ok, i can edit and read the variable from my custom page. I merely cannot display the variable on my lcd. Maybe i should start a new thread...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    There once was a lady named Bright
    who traveled much faster than light
    She departed one day in a relative way
    and Returned on the Previous Night

    Cheers,
    Wannabe Ub3r Geek

    World of Warcraft Website
    Star Trek official website
    Google (Man's best friend...)
Sign In or Register to comment.