View Single Post
  #5   Spotlight this post!  
Unread 29-07-2004, 13:44
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Re: Automatic Shifting Algorithm

Why not measure the RPMs of the motor and up/downshift as necessary?
IE:
Code:
// Globals
long RPM;
#define MINRPM 10
#define MAXRPM 100
unsigned char Gear = 1;
#define MAXGEAR 4
#define MINGEAR 1

//...
// in some sub...

if (RPM < MINRPM) Gear--;
if (RPM > MAXRPM) Gear++;
if (Gear < MINGEAR) Gear = MINGEAR;
if (Gear > MAXGEAR) Gear = MAXGEAR;
// change gears, if necesary
[edit]This is all asuming the code can shift well and measure rpms acurately enough[/edit]