Sending multiple variables over SEROUT command?
Dmitriy
Posts: 7
I am using a BS2p chip with a SFE ER-301 GPS unit.
Using the basic AEROGPS code provided in http://www.parallax.com/dl/docs/article/rambal-gps.pdf, I am able to get it to output some of the information I need.
Currently the output over the DEBUG screen is:
46:20:38.9,S,040:56:31.6,W
using an DEBUG code of:
DEBUG DEC2 laDeg,":",DEC2 laMin,":",DEC2 laSec / 10,".",DEC1 laSec // 10,Comma,"N" + (laNS * 5),Comma,DEC3 loDeg,":",DEC2 loMin,":",DEC2 loSec / 10,".",DEC1 loSec // 10,Comma,"E" + (loEW * 18),CR
How can I get the same output to transmit back over the serial cable?
I have tried the SEROUT command, but cannot get the same output to appear.· Single variable are easy to do using SEROUT 16, 240 [noparse][[/noparse]laDeg], but not having any luck matching to the DEBUG output.
TIA
Using the basic AEROGPS code provided in http://www.parallax.com/dl/docs/article/rambal-gps.pdf, I am able to get it to output some of the information I need.
Currently the output over the DEBUG screen is:
46:20:38.9,S,040:56:31.6,W
using an DEBUG code of:
DEBUG DEC2 laDeg,":",DEC2 laMin,":",DEC2 laSec / 10,".",DEC1 laSec // 10,Comma,"N" + (laNS * 5),Comma,DEC3 loDeg,":",DEC2 loMin,":",DEC2 loSec / 10,".",DEC1 loSec // 10,Comma,"E" + (loEW * 18),CR
How can I get the same output to transmit back over the serial cable?
I have tried the SEROUT command, but cannot get the same output to appear.· Single variable are easy to do using SEROUT 16, 240 [noparse][[/noparse]laDeg], but not having any luck matching to the DEBUG output.
TIA
Comments
What is the code you’re currently using to send the same data serially?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
I've attached the combined and individual scripts.
TIA
SEROUT 16,$F0,[noparse][[/noparse] DEC2 laDeg,":",DEC2 laMin,":",DEC2 laSec / 10,".",DEC1 laSec ,Comma,"N" + (laNS * 5),Comma,DEC3 loDeg,":",DEC2 loMin,":",DEC2 loSec / 10,".",DEC1 loSec ,Comma,"E" + (loEW * 18),CR]
The // 10 after DEC1 is not necessary. It is implied.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
No. $F0 is the hex equivalent of 240 decimal. It is the baud rate setting
for SEROUT.
phil