Greetings: I'm currently working on implementing the Gyro sensor for our team in the Autonomous phase. I started by making a code that would turn the robot a certain number of degrees at a desired power level using the Gyro sensor, which I found fairly straightforward. However, I hit a roadblock when I went to create a function that would use the Gyro heading value and have the robot continue in a straight path even if it were to be interfered with or the wheels weren't exactly in sync. Another team suggested using encoders on the motors for this, however my team is tight on our budget and can't afford to use encoders, so we will have to resort to using the Gyro and wait commands in autonomous.

If anyone has a code that they could share or something that would point me in the right direction on how to accomplish this, it would be greatly appreciated.