Shop OBEX P1 Docs P2 Docs Learn Events
fullduplexserialplus question — Parallax Forums

fullduplexserialplus question

electromanjelectromanj Posts: 270
edited 2010-10-06 17:57 in Propeller 1
Hello all, I have a question about the getstr method.

PUB str(stringptr)

'' Send zero terminated string that starts at the stringptr memory address

repeat strsize(stringptr)
tx(byte[stringptr++])

what is the (stringptr)? is that a variable, or the rx pin?
Kinda lost here.

Thanks for any help.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2010-10-06 15:41
    In that routine, stringptr is the address of a character in a zero-terminated string, just like the comment says.
  • wjsteelewjsteele Posts: 697
    edited 2010-10-06 15:41
    It is simply the address of the string you wish to send.

    You can call it by simply calling:

    obj.str(string("Hello, World!")) or obj.str(myStringVar)

    Bill
  • electromanjelectromanj Posts: 270
    edited 2010-10-06 15:46
    Ok, thanks, I guess I'm way off. I'm trying to read a response from a GM862 module.
  • wjsteelewjsteele Posts: 697
    edited 2010-10-06 17:57
    Why not use the GPS object in the OBEX? (I think it's called GPS_IO.)

    Bill
Sign In or Register to comment.