
24-02-2010, 17:52
|
 |
 |
FTC, I have returned.
AKA: @doctorfogarty
FTC #11444 (Garnet Squadron) & FRC#1102 (M'Aiken Magic)
Team Role: Mentor
|
|
Join Date: Aug 2009
Rookie Year: 2006
Location: SC
Posts: 1,564
|
|
|
Re: [FTC]: 4 Stage Gear Train HELP!
Quote:
Originally Posted by buddyb
I agree with Abra. Our team uses 1:9, and it serves us really well. 1:36 seems like a bit much.
If you need to retain your current ratio, though, try code like this (pseudocode; will not compile in anything; you need to run this as a separate task, or integrate it in to your main loop such that it is executed without an explicit wait)
Code:
//5 for all of the values is arbitrary. For faster revving, go with 10 or so.
IF(abs(motor_power - desired_motor_power) < 5)
motor_power = desired_motor_power;
ELSE IF(motor_power > desired_motor_power)
motor_power = motor_power - 5;
ELSE
motor_power = motor_power + 5;
WAIT 100 milliseconds;
If implemented, this code will get you from 0 to 100 power in 2 seconds. If you want to go from 0->100 in less time, increase 5 to anything you want. It is *highly* advised that you not decrease the wait time much, because if you go from 0->100 in 20ms, there's hardly any point to a revving system.
|
you'll have to really control it because if it's to strong you'll be disqualified.
__________________
John Fogarty
2010 FTC World Championship Winner & 2013-2014 FRC Orlando Regional Winner
Mentor FRC Team 1102 M'Aiken Magic
"Head Bot Coach" FTC Team 11444 Garnet Squadron
Former Student & Mentor FLL 1102, FTC 1102 & FTC 3864, FRC 1772, FRC 5632
2013 FTC World Championship Guest Speaker
|