Changes between Version 12 and Version 13 of ControlSystems/SoftwareTeam/Training/GettingStarted/IntroRobotJava
- Timestamp:
- Oct 15, 2019, 7:32:57 PM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ControlSystems/SoftwareTeam/Training/GettingStarted/IntroRobotJava
v12 v13 107 107 == Fourth program: DC Motor Control 108 108 109 Create another program using the !TimedRobot java template and name it !MotorTest. Modify the generated code as follows: 109 Create another program using the !TimedRobot java template and name it !MotorTest. 110 The 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 115 Modify the generated code as follows: 116 110 117 * Add the following imports: 111 118 {{{ … … 133 140 x = (x + 1.0) / 2; 134 141 // Set motor speed based on joystick 135 m_rearLeft.set Speed(x);142 m_rearLeft.set(x); 136 143 }}} 137 144