My team has been trying to make our autonomous code work for a while. We just got a new inertial and brain but when we try testing the auton the robot just keeps on spinning when it comes to the point it has to turn.
To make the robot turn we use; chassis.turn_to_angle(__);
To move the robot we use; chassis.drive_distance(distance,heading,maxvoltage,headingvoltage)
For us to be able to provide help, you should mention how these functions are implemented.
(And if you’re using JAR template, you should disclose that and show your Drive constructor.)
That’s the part that I wrote. Show the part where you wrote your Gyro port, and make sure there is really a Gyro plugged into that port.
Where’s the space where you’re supposed to do that?
src/main.cpp line 53, where it says
//Specify the PORT NUMBER of your inertial sensor, in PORT format (i.e. “PORT1”, not simply “1”):
I did do that, in that format
Open the gyro in devices menu on the brain and check that it knows when the robot is being spun (and that it’s plugged into the right port). If not, switch gyros and check again.
