Changes between Version 12 and Version 13 of ControlSystems/SoftwareTeam/Training/GettingStarted/IntroRobotJava


Ignore:
Timestamp:
Oct 15, 2019, 7:32:57 PM (6 years ago)
Author:
David Albert
Comment:

--

Legend:

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

    v12 v13  
    107107== Fourth program: DC Motor Control
    108108
    109 Create another program using the !TimedRobot java template and name it !MotorTest. Modify the generated code as follows:
     109Create another program using the !TimedRobot java template and name it !MotorTest.
     110The motor controller Class is provided by a third party so you need to add the vendor library to the project:
     111* WPILib->Manage Vendor Libraries
     112* -> Install new library (offline)
     113* -> Select ctre Phoneix library  (or similar)
     114
     115Modify the generated code as follows:
     116
    110117* Add the following imports:
    111118{{{
     
    133140    x = (x + 1.0) / 2;
    134141    // Set motor speed based on joystick
    135     m_rearLeft.setSpeed(x);
     142    m_rearLeft.set(x);
    136143  }}}
    137144