Thread: RPM calculator
View Single Post
  #9   Spotlight this post!  
Unread 28-02-2012, 16:41
dbeckwith's Avatar
dbeckwith dbeckwith is offline
Lead Programmer
AKA: Daniel Beckwith
FRC #3205 (The Patriots)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2009
Location: USA
Posts: 84
dbeckwith is an unknown quantity at this point
Re: RPM calculator

Quote:
Originally Posted by ProgrammerMatt View Post
The encoder class works with both i belive..
if so
Code:
Encoder myencoder = new Encoder(#);

myencoder.getRate();
the the rate works off ticks per secound you need to scale it down.
No, I think Joe is right. The Encoder class is for quadrature encoders which use two signals, and this encoder the OP is trying to use only has one signal and if I'm not mistaken produces a different type of signal (the way it counts rotation is different). It's unfortunate that there's no built-in FRC class for those encoders though.
__________________
q = (2*b) | ~(2*b);

if (life.getLemons() != null) this.lemonade = new Drink(life.getLemons());
else throw new NoLemonsException("What now?");


Reply With Quote