How do i Program a Gyroscope With V5

  1. last week

    Nathan004

    Jan 8 OHIO 4810B

    So myself and others are and have been wondering how to program a gyroscope with the new V5 software, thanks for your input and please get back to me as soon as possible.

  2. callen

    Jan 8 Braintree, MA, USA

    Do you know how to program a gyro otherwise? If so, these are the methods available in VCS:

    vex::gyro.gyro
    vex::gyro.value
    vex::gyro.startCalibration
    vex::gyro.isCalibrating
    vex::gyro.changed

  3. lacsap

    Jan 8 Event Partner, V5 Beta Tester Massachusetts 9791[a-z]

    This was an example posted by James Pearman not too long ago - :

    vex::gyro Gyro1( Brain.ThreeWirePort.C );
    
    int main() {
    Brain.Screen.setFont( mono40 );
    
    Gyro1.startCalibration();
    
    while(1) {
          Brain.Screen.printAt( 10, 50, "Gyro %6.1f", Gyro1.value( vex::rotationUnits::deg ) );
          // Allow other tasks to run
          vex::this_thread::sleep_for(50);
         }
    }
 

or Sign Up to reply!