Shop OBEX P1 Docs P2 Docs Learn Events
Pink serout data — Parallax Forums

Pink serout data

japerjaper Posts: 105
edited 2008-01-11 01:31 in General Discussion
hello

i need some help and finding a solution to a problem.
i have some logged data in a stamp. 6 fields and 10 records
using the ptr system, is their a way i can serout this info to
the pink module. cant seem to cascade the logged data
can only read the last record in the run. debug's ok in the
terminal. has anybody had this problem before,
or is their a way to monitor the <nbvar> in the web page
and log a change. been on it awhile any help or clue in the right direction would be appreciated
thank you
japer

Comments

  • DgswanerDgswaner Posts: 795
    edited 2008-01-09 05:33
    can you post your code? and which version of the PINK do you have?

    you should easily be able to send and store the data to the pink via SERIAL. you can view the variables on the PINK variable config page or make your own web page and just list the vars how you want them <NB_var00> will display as the value for that variable.

    it sounds like your writing the data to the same variable, you need to increment the variable for each field. on your serout statement add a variable that you can incrament in place of the var number.

    with out knowing more specifics or seeing your code that's the best I can do.

    hope that's a little help!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "A complex design is the sign of an inferior designer." - Jamie Hyneman, Myth Buster

    DGSwaner
  • japerjaper Posts: 105
    edited 2008-01-09 11:46
    hello Dgswaner
    sorry i havent responded quickly thanks for your quick reply.
    to answer your question, yes i can not figure ,how to incremental change the "!NB0W" value as the ptr
    loops attacked is the code . it will work in the debug terminal and stop the loop when commanded
    from the web page but cant seem to figure the ("!NB0W" )+ 1 command
    thank you
    japer
  • DgswanerDgswaner Posts: 795
    edited 2008-01-09 15:18
    The reason it seems to work in DEBUG is that it's doesn't need to be incremented. the line feeds do that for you. if you were to position the text in a certain location, you would see each line of data flash and only the last line would show.

    here is what you need to do
    varDATA = "hello world"
    FOR x = 10 TO 20
    SEROUT 4,396,[noparse][[/noparse]"!NB0W",DEC x,":", VarDATA, CLS]
    NEXT

    the actual serial data sent is "!NB0W10:hello world"

    10 being the value of X

    so in the for next loop you need to make sure that you have enough places for all of your data.

    hope that helps

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "A complex design is the sign of an inferior designer." - Jamie Hyneman, Myth Buster

    DGSwaner

    Post Edited (Dgswaner) : 1/9/2008 4:22:27 PM GMT
  • japerjaper Posts: 105
    edited 2008-01-10 04:22
    hello Dgswaner
    thanks for your input it has me on the right track .
    as it will point to the next Nb_Var ,but still READs the last input of the ptr
    to the next Nb_Var. also is seems to throw the timing off also
    it does work well to clear all the varibles at on time.
    as with
    for x = 01 to 06
    serout 4,396.[noparse][[/noparse]"NBOW",DEC2 x, ":0",CLS]
    next
    thanks
    japer
  • japerjaper Posts: 105
    edited 2008-01-10 12:59
    Success!
    Thanks to Dgswaner pointing in the right direction
    changing the order of the nested loops
    it work's beautiful will post code tonight
    japer
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-01-10 18:35
    Japer,

    One thing I noticed doesn’t look right in your code is that you’re using a letter ‘O’ instead of a number 0 in the “NB0W” section.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • japerjaper Posts: 105
    edited 2008-01-11 01:31
    Thanks again Dgswaner
    heres the code that works

    thank Mr Savage for pointing out my typo it is a (0)
    found that out the hard way when started using Pink
    thanks again
Sign In or Register to comment.