Go to Post Now, everyone knows that Oompaloompas are like bunnies in that they have an insatiable desire to multiply, and the same can be said with Michigan teams (with all due respect) which are currently multiplying and filling that hand-shaped democratic kingdom with their honorable number. - Eugenia Gabrielov [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 21-01-2016, 04:04
simon1636 simon1636 is offline
Registered User
FRC #4501
 
Join Date: Dec 2015
Location: California
Posts: 9
simon1636 is an unknown quantity at this point
Two Talons for Two Sets of Wheels

Hi! My team's robot has two sets of 3 wheels on each side. It's 6 in all. The left side is hooked up to a talon as well as the right. We are trying to get each game pad joystick to run each side seperately. In order to do this, would you assign each stick a talon, and have it so that when that joystick is pushed, the talons speed is set to a number? This is what I thought, but if anyone can show some sample code of our desired outcome, that would be great! Thank you guys so much!
Reply With Quote
  #2   Spotlight this post!  
Unread 21-01-2016, 07:12
EmileH's Avatar
EmileH EmileH is offline
uses the Talon SRX way too much
AKA: Emile Hamwey
FRC #1058 (The PVC Pirates) & SLFF (NE Way You Want It)
Team Role: Programmer
 
Join Date: Dec 2014
Rookie Year: 2011
Location: New England
Posts: 539
EmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant future
Re: Two Talons for Two Sets of Wheels

Quote:
Originally Posted by simon1636 View Post
Hi! My team's robot has two sets of 3 wheels on each side. It's 6 in all. The left side is hooked up to a talon as well as the right. We are trying to get each game pad joystick to run each side seperately. In order to do this, would you assign each stick a talon, and have it so that when that joystick is pushed, the talons speed is set to a number? This is what I thought, but if anyone can show some sample code of our desired outcome, that would be great! Thank you guys so much!
Check out the Tank Drive class. When you go to create a project in eclipse, instead of clicking Robot Java Project, click "Example Robot Java Project" and find tank drive in the list.
__________________
2016-present: High School Student, FRC 1058 PVC Pirates

Reply With Quote
  #3   Spotlight this post!  
Unread 21-01-2016, 10:57
BenD BenD is offline
Registered User
FRC #4828 (Swift Creek RoboEagles)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2013
Location: North Carolina
Posts: 2
BenD is an unknown quantity at this point
Re: Two Talons for Two Sets of Wheels

After defining your Talons and Joystick objects in your Robot class, create a RobotDrive object like so:
Code:
RobotDrive drive = new RobotDrive(leftTalon, rightTalon);
Then simply call the tank drive function on your RobotDrive object:
Code:
drive.tankDrive(leftJoystick, rightJoystick);
Reply With Quote
Reply


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 12:02.

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