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!