Changes between Version 9 and Version 10 of ControlSystems/SoftwareTeam/Training/GettingStarted/RobotFSM1


Ignore:
Timestamp:
Nov 13, 2019, 9:47:08 AM (5 years ago)
Author:
David Albert
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ControlSystems/SoftwareTeam/Training/GettingStarted/RobotFSM1

    v9 v10  
    4242    // opposite directions to turn the wheels in the same direction.
    4343    l_motor.set(0.20);
    44     r_motor.set(-0.20);
     44    r_motor.set(0.20);
    4545    // reset wheel encoders so we can tell how far we've driven
    4646    l_encoder.reset();
     
    5252    // the same direction to turn wheels in opposite directions (rotate robot)
    5353    l_motor.set(0.20);
    54     r_motor.set(0.20);
     54    r_motor.set(-0.20);
    5555    // reset wheel encoders so we can tell how far we've turned
    5656    l_encoder.reset();
     
    7272    l_motor = new Talon(0);
    7373    r_motor = new Talon(1);
     74    r_motor.setInverted(true); // right motor turns opposite direction
    7475    // Quadrature encoders connected to DIO ports 0,1 and 2,3
    7576    l_encoder = new Encoder(0,1);
    76     r_encoder = new Encoder(2,3);
     77    r_encoder = new Encoder(2,3, true); // right wheel turns opposite direction
    7778    // 7.5" wheels with 360-pulse-per-rotation encoders
    7879    l_encoder.setDistancePerPulse((7.5 * 3.141592) / 360);