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!
Announcement
Collapse
Technology Forum Has Moved!
The FIRST Tech Challenge Technology forum has moved to a new location! Please take a look at our forum blog for links and instructions on how to access the new forum.
Note that volunteers (except for FTA/WTA/CSA will still access their role specific forum through this site. The blog also outlines how to access the volunteer forums.
Note that volunteers (except for FTA/WTA/CSA will still access their role specific forum through this site. The blog also outlines how to access the volunteer forums.
See more
See less
Issues Turning Using IMU
Collapse
X
-
Originally posted by GearTicks View Post
You can definitely make these calculations smaller and simpler. The remainder and sign operations are very handy.
Code:[FONT=courier new] double delta = (tarH - currH + 540) % 360 - 180; //gets delta in the range -180 to 180[/FONT]
Mentor, teams 8578 & 11959
Comment
Comment