Shop OBEX P1 Docs P2 Docs Learn Events
To set a variable on the PINK to a word value — Parallax Forums

To set a variable on the PINK to a word value

Ryan ClarkeRyan Clarke Posts: 738
edited 2006-05-12 20:36 in BASIC Stamp
(Per customer request)

Here is an example of sending a word value to a PINK variable:

' {$STAMP BS2}
' {$PBASIC 2.5}

x   VAR   Word

x = 12345

SEROUT 8, 396, [noparse][[/noparse]"!NB0W10:",DEC x,CLS]

END




This sets variable 10 to 12345. Remember if this is read back it will be sent as ASCII bytes, format accordingly.

Ryan

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ryan Clarke
Parallax Tech Support

RClarke@Parallax.com

Post Edited (Ryan Clarke (Parallax)) : 5/12/2006 8:59:35 PM GMT
Sign In or Register to comment.