Announcement

Collapse
No announcement yet.

Issues Turning Using IMU

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Thanks GearTicks abd KernelPanic for the help! Using some of the code we had and combining it with bits and pieces of what you suggested we have a robot that is now accurately turning using the IMU. Thanks again for all of the help!

    Comment


    • #17
      Originally posted by GearTicks View Post

      You can definitely make these calculations smaller and simpler. The remainder and sign operations are very handy.
      Code:
          double delta = (tarH - currH + 540) % 360 - 180; //gets delta in the range -180 to 180
      Nice! Will play around with that. Thanks!
      Mentor, teams 8578 & 11959

      Comment

      Working...
      X