hm55b compass
pilot00
Posts: 30
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.
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
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.