View Single Post
  #9   Spotlight this post!  
Unread 12-07-2012, 23:05
KrazyCarl92's Avatar
KrazyCarl92 KrazyCarl92 is offline
Registered User
AKA: Carl Springli
FRC #5811 (The BONDS)(EWCP)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Dayton, OH
Posts: 521
KrazyCarl92 has a reputation beyond reputeKrazyCarl92 has a reputation beyond reputeKrazyCarl92 has a reputation beyond reputeKrazyCarl92 has a reputation beyond reputeKrazyCarl92 has a reputation beyond reputeKrazyCarl92 has a reputation beyond reputeKrazyCarl92 has a reputation beyond reputeKrazyCarl92 has a reputation beyond reputeKrazyCarl92 has a reputation beyond reputeKrazyCarl92 has a reputation beyond reputeKrazyCarl92 has a reputation beyond repute
Re: Low Res Optical Encoders for Speed Control

Quote:
Originally Posted by Ether View Post

Use only one channel of the encoder and use the Counter class to trigger on rising edge only.


Our team uses Java. I'm not much of a programmer as it relates to the robot, but I have a bit of experience.

I notice that all of the constructors for Encoder objects require both an A channel and B channel as arguments, whereas the Counter constructors allow you to specify a single channel. Is this why we would use the Counter class to only count the rising edges? The Counter class doesn't have a getRate method, but would the getPeriod method return values that are useful for what we're trying to do?

And I noticed that 1x, 2x, and 4x counting are mentioned in the descriptions of many of the methods in the Encoder class. Is this something we need to consider when using the Counter class as well?
__________________
[2017-present] FRC 0020 - The Rocketeers
[2016] FRC 5811 - BONDS Robotics
[2010-2015] FRC 0020 - The Rocketeers