Go to Post Now, if that team were to split...would it be dividing by zero? - Karibou [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #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
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 22:20.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi