Our team was planning on programming a gyro but don’t know how to go about it. Can anyone help?
Before doing anything with the sensor in your program, you need to calibrate the gyroscope for about 3 to 5 seconds using the Gyroscope.startCalibration(). Then, the gyroscope works so that you start from 0 (wherever the robot starts) and if you go immediately to the right, the values are positive. Going immediately to the left, the values are negative. You can use while loops to set the motors to a speed until the target angle has been reached. Using the Gyroscope.value(vexx::analogUnits::range12bit), you will get your value in 10th of degrees. So instead of 180, it will output 1800. Hope this helped.
Here is a link to an answered question about gyroscope, it helped me.