Also you should check out the Javadoc page for the Encoder class. If you weren't aware, you can find the Javadoc for WPILib at 'C:\Users\
username\sunspotfrcsdk\doc\javadoc\index.html' on any computer set up for Java development. Alternatively,
here's a link to a copy on the web. Particularly note the Encoder#get() and Encoder#getRate() methods, which give you the position and the rotation rate of the encoder respectively.