Go to Post Wait...engineers have personalities? - Mark McLeod [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 17-02-2013, 17:21
tmccalister tmccalister is offline
Registered User
FRC #2985
 
Join Date: Jan 2011
Location: TEXAS YEEEHAWWWWW
Posts: 18
tmccalister is an unknown quantity at this point
Re: Programming a super shifter/gearbox

Quote:
Originally Posted by artdutra04 View Post
The simplest method of programming a shifting gearbox is to map one button on the joystick or game pad to control the shifting pneumatic cylinder, and hen do tank or arcade drive as desired.

In this case, the CIM motors are programmed exactly the same as a regular single speed gearbox. Then program your desired trigger button on the joystick to control the solenoid. Drive without the button pressed, and it is in low gear. Press and hold the trigger button, it shifts to high gear.
That makes a lot of sense. But this isnt a pneumatic so theres no solenoid. its just a small piece that moves up down. and changes from a smaller gear to a higher gear. I understand the theory behind it I just don't know what the class is for the gear box. It plugs in where the jaguars go but I think I would encounter problems if I programmed it as a jaguar. (sorry im a little confused about this because the electronics team doesnt really know how to put this together.)
Reply With Quote
  #2   Spotlight this post!  
Unread 17-02-2013, 17:31
MagiChau's Avatar
MagiChau MagiChau is offline
Registered User
AKA: Michael Chau
FRC #0085 (B.O.B. (Built on Brains))
Team Role: Alumni
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Zeeland, Michigan
Posts: 875
MagiChau is just really niceMagiChau is just really niceMagiChau is just really niceMagiChau is just really nice
Re: Programming a super shifter/gearbox

Quote:
Originally Posted by tmccalister View Post
That makes a lot of sense. But this isnt a pneumatic so theres no solenoid. its just a small piece that moves up down. and changes from a smaller gear to a higher gear. I understand the theory behind it I just don't know what the class is for the gear box. It plugs in where the jaguars go but I think I would encounter problems if I programmed it as a jaguar. (sorry im a little confused about this because the electronics team doesnt really know how to put this together.)
You are describing a servo. So you would program this as a servo object presuming it is like or is a Hitec HS-322

http://www.trossenrobotics.com/store...bby-servo.aspx
Reply With Quote
  #3   Spotlight this post!  
Unread 17-02-2013, 18:59
tmccalister tmccalister is offline
Registered User
FRC #2985
 
Join Date: Jan 2011
Location: TEXAS YEEEHAWWWWW
Posts: 18
tmccalister is an unknown quantity at this point
Re: Programming a super shifter/gearbox

Quote:
Originally Posted by MagiChau View Post
You are describing a servo. So you would program this as a servo object presuming it is like or is a Hitec HS-322

http://www.trossenrobotics.com/store...bby-servo.aspx
Thank you so much sir. You are a gentleman and a scholar so...

Servo supershifter = new servo (1); ?
Then how would I set it to change between gears?
Reply With Quote
  #4   Spotlight this post!  
Unread 17-02-2013, 21:17
MagiChau's Avatar
MagiChau MagiChau is offline
Registered User
AKA: Michael Chau
FRC #0085 (B.O.B. (Built on Brains))
Team Role: Alumni
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Zeeland, Michigan
Posts: 875
MagiChau is just really niceMagiChau is just really niceMagiChau is just really niceMagiChau is just really nice
Re: Programming a super shifter/gearbox

Quote:
Originally Posted by tmccalister View Post
Thank you so much sir. You are a gentleman and a scholar so...

Servo supershifter = new servo (1); ?
Then how would I set it to change between gears?
I myself use the set() method so here's some java pseudo code for controlling it with joystick buttons. This assumes you want the servo to go through the full range of motion from 0 to 1. There is also a setAngle() method you could use.

Code:
if (buttonIsPressed()) {
    servo.set(1);
} else if (anotherButtonIsPressed()) {
    servo.set(0);
}
Reply With Quote
  #5   Spotlight this post!  
Unread 18-02-2013, 18:39
tmccalister tmccalister is offline
Registered User
FRC #2985
 
Join Date: Jan 2011
Location: TEXAS YEEEHAWWWWW
Posts: 18
tmccalister is an unknown quantity at this point
Re: Programming a super shifter/gearbox

I figured it was that so I had put it in and it told me it was wrong. then I realized i forgot to capitalize servo. -_- gotta love programming.
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 10:13.

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