View Single Post
  #3   Spotlight this post!  
Unread 18-01-2015, 18:34
team-4480's Avatar
team-4480 team-4480 is offline
Debug? What's that?
FRC #4480
 
Join Date: Jan 2015
Rookie Year: 2013
Location: Minnesooota
Posts: 229
team-4480 will become famous soon enoughteam-4480 will become famous soon enough
Re: How to use a fifth drive motor with RobotPy?

Quote:
Originally Posted by x86_4819 View Post
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!
So then for the side motors, it would be
Code:
self.side_motor.set(self.joystick.getY())
? We will try it Monday!