C++ Gyro

Does anyone know how to code a gyro? We are using it to measure our turns

It is just like any other sensor, you can use the sensor value statement to use for the code. 3600 is 360 degrees

ok. How do you make it where the robot chassis rotates until it reaches a certain degree?

In a while loop,
while(Sensorvalue(gyro) <900)
{

}

Or you can get really precise with pid

We tried what you said and it didn’t work.
2.0 RFP.vex (9.5 KB)
gyro.JPG

He is using VCS, not RobotC.

Jack202020, we tried that and it didn’t work. Thank you for helping and we appreciate the time for trying to help. If you

The program he gave you is in robot c and you are programming in vex c++ so you should actually use
while(gyro.value(rotationunits::deg) <900)
{

}

Did you try what I suggested on your other post, here? VCS C++ Gyro Help!! - VEX Coding Studio Tech Support - VEX Forum

Please only make one post per issue