Shop OBEX P1 Docs P2 Docs Learn Events
hm55b compass — Parallax Forums

hm55b compass

pilot00pilot00 Posts: 30
edited 2009-05-15 19:46 in Propeller 1
Howdy,
I have been trying to get this small piece of code to work and cannot understand why it does not work
I have attempting to get the compass value to trigger a simple LED toggle and cannot understand why it will not
work with the compass attached.

Each piece of the code has been tested separately. The compass does work separately and with this code but
whether I use the CASE statement or an IF statement when the debug value matches the compass value
the condition will not trigger. Separately tried without the compass imput but with debug for both imputs the
conditional statement is triggered.

Any ideas.

Thanks.

Comments

  • Rick PriceRick Price Posts: 36
    edited 2009-05-15 19:46
    I would double check the indentation.

    I had to load it into wordpad, and I noticed that the indentation in go was not completely the way I think it should be:

    debug.dec(heading)
    if (nose == heading)
    debug.dec(nose)
    debug.dec(heading)
    debug.str(string( "bingo",13))
    blinker
    waitcnt(clkfreq/10+cnt)


    I have had issues caused by indentation before.
Sign In or Register to comment.