Shop OBEX P1 Docs P2 Docs Learn Events
Sending large variables to Pink fails. Anybody solution? — Parallax Forums

Sending large variables to Pink fails. Anybody solution?

Mr.EdMr.Ed Posts: 35
edited 2006-10-25 23:01 in BASIC Stamp
Hi everybody,

I'm having difficulties in sending large variables to my Pink module. What i am trying to do is something like this:

addr·· VAR·· byte
char·· VAR·· byte

FOR addr = 0 to 63······································· 'count 64 address positions, largest possible variable in Pink
GET addr, char··········································· ·'Read from RAM
SEROUT 15, Baud, [noparse][[/noparse]"!NB0W06:", char, CLS]····· 'output to Pink
Next

The Pink module does not accept this and seems to choke on this. It reacts like its getting a new 1-byte variable for 64 times in too short time, hence the rejections.

What is the best method in sending large variables (of 64· bytes) to the Pink module? The use of strings seems useless for they cannot be made long enough.

Best regards,

Ed.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
A horse is a horse, of course of course...

Comments

  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2006-10-16 10:19
    See this thread
    http://forums.parallax.com/showthread.php?p=556998

    addr·· VAR·· byte
    char·· VAR·· byte

    SEROUT 15, Baud, [noparse][[/noparse]"!NB0W06:"]····· 'output to Pink
    FOR addr = 0 to 62······································· 'count 63 address positions, largest possible variable in Pink
    GET addr, char··········································· ·'Read from RAM
    SEROUT 15, Baud, [noparse][[/noparse]char]····· 'output to Pink
    Next
    SEROUT 15, Baud, [noparse][[/noparse]CLS]····· 'output to Pink

    regards peter


    Post Edited (Peter Verkaik) : 10/16/2006 10:25:36 AM GMT
  • Mr.EdMr.Ed Posts: 35
    edited 2006-10-16 21:14
    Yes, thank you Peter,

    This seems a logic step and i seem to remember that i tried something familiar, but because i couldn't get it to work, i abandoned that approach. I will try your suggestion and will get back to you on that.

    Secondly, i have read your thread on the rollover issue and i really could use extra space for storing variables and it seems as if there is no real boundary (ofcourse the 6300 character boundary is) so i will try that allso.

    Thank you very mucht for your reply. I'm feeling confident that i will get done what i planned in the first place.

    Best regards,

    Ed.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    A horse is a horse, of course of course...
  • Mr.EdMr.Ed Posts: 35
    edited 2006-10-25 23:01
    Hi everybody,

    I tried suggested approach and i got it to work!

    Thanks again for the support.

    Best regards,

    Ed.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    A horse is a horse, of course of course...
Sign In or Register to comment.