Shop OBEX P1 Docs P2 Docs Learn Events
Help with Compass Apmod and BS2sx — Parallax Forums

Help with Compass Apmod and BS2sx

TrepidcatTrepidcat Posts: 6
edited 2005-08-10 12:21 in BASIC Stamp
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,[noparse][[/noparse]0] 'the example had 188+$8000 for baudrate (BS2)

do
serout 5,17405,[noparse][[/noparse]"!CM0?"] 'the example had 32+$8000 for baudrate (BS2)
serin 5,17405,[noparse][[/noparse]Heading] 'the example had 32+$8000 for baudrate (BS2)

debug ? Heading
loop

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-08-10 02:22
    Hello,

    ·· The answers are in the Help files in the Stamp Editor under the command SEROUT.· The 84 would need to be replaced with 240, or as you have combined the values, 33008.··

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • TrepidcatTrepidcat Posts: 6
    edited 2005-08-10 12:21
    Thanks Chris I will look in the editor help for the answer. tongue.gif

    That did work and now I know why. The Editor help example was very helpful.

    Post Edited (Trepidcat) : 8/10/2005 10:03:21 PM GMT
Sign In or Register to comment.