I’ve tried several variations of this code to program an inertial sensor to make more accurate turns, but is always spins forever when I try to use this custom block. I’ve tried adding a wait to give it time to calibrate, removing the wait, making it print on the brain, not making it print on the brain, using inequalities, using an if block instead of a while block. However, it still spun forever (or didn’t work at all) for every trial. Please give me advice to fix it.
Trying to compare the inertial sensor rotation to an absolute number to stop turning will almost never work, you need to check to see if it’s within some number of degrees of the required target.
Hello! I used a block that compared the turns. We would say the turn needed to be between 88 and 92 degrees. I would make it an almost perfect turn. Hope this helps! If you have questions reply to this and I will try to explain.