Shop OBEX P1 Docs P2 Docs Learn Events
HM55b Compass Calibration Code — Parallax Forums

HM55b Compass Calibration Code

John AbshierJohn Abshier Posts: 1,116
edited 2010-10-27 15:07 in Accessories
In the following code (CalibrateHm55bCompass.bs2)
CASE 3                                 ' West
        y = y + temp(1)
        IF Y.BIT15 = 1 THEN
          y = ABS(y)/2
          y = - y
        ELSE
          y = x / 2
        ENDIF
        WRITE CompassOffsets + 2, Word y

shouldn't y = x / 2 be y = y / 2?

Code downloaded from Parallax product page today.

John Abshier
Sign In or Register to comment.