View Single Post
  #2   Spotlight this post!  
Unread 18-01-2015, 18:27
x86_4819's Avatar
x86_4819 x86_4819 is offline
computer-whisperer
AKA: Christian Balcom
FRC #4819 (Flat Mountain Mechanics)
Team Role: Programmer
 
Join Date: Sep 2014
Rookie Year: 2013
Location: Shepherd MI
Posts: 92
x86_4819 is on a distinguished road
Re: How to use a fifth drive motor with RobotPy?

To do this you will need to do the following:

Initialize the new motor controller object in robotInit():
Code:
self.slide_motor = wpilib.Talon(INSERT_PORT_NUMBER_HERE)
If your motor controller is something other than a Talon, you will need to adjust accordingly.

Use the x-axis of the Joystick to control the motor in teleopPeriodic():
Code:
self.slide_motor.set(self.joystick.getX())
I hope this works for you!
__________________




My Github Repositories