Storing Multiple Characters in a Variable
Mikerocontroller
Posts: 310
· I'm using the HB-55B Compass Module and it works fine so far.· The trouble I'm having is trying to store the
compass cardinal readings ("N","NW","S","SW",etc..) in a Word-sized variable.· How do I store a character string?
····· ·Thank-You.
compass cardinal readings ("N","NW","S","SW",etc..) in a Word-sized variable.· How do I store a character string?
····· ·Thank-You.
Comments
It's not really a character string, but it is two characters.
You could treat it as a two byte array and use the STR formatter like:
SEROUT <pin>,<Baud>,[noparse][[/noparse] STR v\2 ]
I think this'll work.