Shop OBEX P1 Docs P2 Docs Learn Events
Writing power-on default values to PINK — Parallax Forums

Writing power-on default values to PINK

snowman136snowman136 Posts: 4
edited 2008-11-25 15:38 in General Discussion
I'm trying to write a web page that sets the power on default values for the email variables.· I tried the code below:

<FORM ACTION="DEFAULTSET.HTM " METHOD=POST>
<H1>Set new power on default value for Nb_varET</H1>
<input type=hidden name=variable_name value="ET"><INPUT NAME="NewVal" TYPE="text" SIZE="64" VALUE=Nb_varET >
</B><BR><BR><INPUT TYPE="submit" value="Submit New Default Value">
</FORM>

It does work but, in order to work, the Action has to be set for DEFAULTSET.HTM·· This terminates by landing me at the vv_show.htm page.· I don't want to land at vv_show.

Can someone share the code in DEFAULTSET.HTM so that I can use some of that code on my page.· If not, can you recommend a solution for my problem?

Thanks!

Comments

  • lenswerkslenswerks Posts: 40
    edited 2008-11-24 01:58
    I would and do set the defaults for mail and all other variables that can written to flash using the vv_show page. The values you set on this page, including Web variables 1-20 will be saved to flash and do not have to be set at power-on by user code.

    Then, you can modify them using commands from your Stamp as needed, but on power-up those defaults will go into effect again.

    Knowing this, why would you want to write code to modify mail variables each time you power-on?
  • snowman136snowman136 Posts: 4
    edited 2008-11-24 12:21
    Thanks for your thoughts. I would agree if this were a lab project but for an end user (non-technical), I need a simple human interface. vv_show is too scary for most folks.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-11-24 15:37
    You cannot change the HTML code in the PINK for setting variables. It is defined by the firmware. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
  • lenswerkslenswerks Posts: 40
    edited 2008-11-24 22:59
    snowman136 said...
    Thanks for your thoughts. I would agree if this were a lab project but for an end user (non-technical), I need a simple human interface. vv_show is too scary for most folks.
    I see.

    If you are going to attach a Stamp, then what about this?

    Provide·a utility in PBasic that could be involked when needed to prompt for these flash stored variables. The utility could write to external EPROM. Then at power-on, Stamp code would read the EPROM and update Nb_vars as necessary in RAM.

    ·
  • snowman136snowman136 Posts: 4
    edited 2008-11-25 01:24
    thanks Chris.· I don't want to change the code in the PINK.· i'm thinking that I·just need a copy of the DEFAULTSET.HTM so that I can make use of some of the code in it. Can i get a copy of that?

    ·
  • snowman136snowman136 Posts: 4
    edited 2008-11-25 01:25
    Thanks lenswerks.· That is an option that I'm considering but, would prefer that to be plan B.·
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-11-25 15:38
    Those pages are hard-coded into the firmware. If you want to see what HTML code was generated for your browser, then when the page is up you can right-click and choose view source. As I said, while you can see this, you can’t change what it is doing. As for setting defaults through the serial connection from the BASIC Stamp, the documentation is clear on this not being possible. Default values are just that…it was not intended as backup non-volatile storage in the sense some are wanting to use it in.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
Sign In or Register to comment.