Trepidcat
08-10-2005, 07:55 AM
I am trying to run the example program for the compass apmod but I am unable to get any headings from the compass. I am using the bs2sx and I am unsure of the baudrate for the serout and serin commands. I've tried looking at the manual and I can not figure out how they got the number for the baudrate they use in the example. Below is the program I am using also the leds do not move on the module when I move the BOE.
'{$STAMP BS2sx}
Heading VAR byte
PAUSE 200
serout 5,17405,[0] 'the example had 188+$8000 for baudrate (BS2)
do
serout 5,17405,["!CM0?"] 'the example had 32+$8000 for baudrate (BS2)
serin 5,17405,[Heading] 'the example had 32+$8000 for baudrate (BS2)
debug ? Heading
loop
'{$STAMP BS2sx}
Heading VAR byte
PAUSE 200
serout 5,17405,[0] 'the example had 188+$8000 for baudrate (BS2)
do
serout 5,17405,["!CM0?"] 'the example had 32+$8000 for baudrate (BS2)
serin 5,17405,[Heading] 'the example had 32+$8000 for baudrate (BS2)
debug ? Heading
loop