82 | | Robots must be able to interact with the environment around them too. Many types of actuators are used in FRC robotics; one of them is the [https://wpilib.screenstepslive.com/s/currentCS/m/java/l/599703-repeatable-low-power-movement-controlling-servos-with-wpilib Servo Motor]. A servo motor is a special type of motor that can rotate to a precise position, usually between 0 and 180 degrees. They come in a variety of sizes and strengths. You can connect a servo motor to any of the PWM ports on the !RoboRIO. Examine the PWM ports and identify which row of pins are ground ([[Image(GroundSymbol.png,25px)]], +6V, and Signal (S). Make sure you connect them to the proper pins on the Servo motor: black or brown goes to Ground, red or orange goes to +6V, yellow/white/blue goes to Signal. You can read more about servo motors [https://learn.sparkfun.com/tutorials/servo-trigger-hookup-guide/all here] |
| 82 | Robots must be able to interact with the environment around them too. Many types of actuators are used in FRC robotics; one of them is the [https://wpilib.screenstepslive.com/s/currentCS/m/java/l/599703-repeatable-low-power-movement-controlling-servos-with-wpilib Servo Motor]. A servo motor is a special type of motor that can rotate to a precise position, usually between 0 and 180 degrees. They come in a variety of sizes and strengths. You can connect a servo motor to any of the [http://www.ni.com/pdf/manuals/375274a.pdf#_OPENTOPIC_TOC_PROCESSING_d443e2165 PWM ports] on the !RoboRIO. Examine the PWM ports and identify which row of pins are ground ([[Image(GroundSymbol.png,25px)]], +6V, and Signal (S). Make sure you connect them to the proper pins on the Servo motor: black or brown goes to Ground, red or orange goes to +6V, yellow/white/blue goes to Signal. You can read more about servo motors [https://learn.sparkfun.com/tutorials/servo-trigger-hookup-guide/all here] |
118 | | |
119 | | Create another program using the !TimedRobot java template and name it !MotorTest. |
120 | | The motor controller Class is provided by a third party so you need to add the vendor library to the project: |
| 118 | For stronger and faster movement, FRC robots use all sorts of motors. There are large motors that propel the robot, small motors that drive flywheel or manipulators, etc. Most DC motors use more power than can be supplied directly from the !RoboRIO so instead the roboRIO communicates with a dedicated high-power motor controller and tells it how fast and in which direction to move the motor. FRC robots support several types of motor controllers; a common and powerful controller is the [https://www.andymark.com/products/talon-srx-speed-controller Talon SRX] often called a CAN Talon. |
| 119 | |
| 120 | Create another program using the !TimedRobot java template and name it !MotorTest. |
| 121 | |
| 122 | The motor controller Class is provided by a third party (Cross The Road Electronics aka CTRE); the team laptops already have the CTRE framework installed; if your laptop does not, you can download and install it [http://www.ctr-electronics.com/control-system/hro.html#product_tabs_technical_resources here]. To use the library, you need to add it to the project: |