View Single Post
  #10   Spotlight this post!  
Unread 01-02-2011, 19:10
NetPlanet NetPlanet is offline
Registered User
AKA: Michael Bilinsky
FRC #0296 (The Northern Knights)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Montreal, Qc
Posts: 23
NetPlanet is an unknown quantity at this point
Re: Encoder with PIDController Help

Our programming mentor was able to answer my previous question and help us do this, but in Java.
Code:
public class SuperEncoder implements PIDSource {
//Initialize the encoder
    SuperEncoder(int a, int b) {

        Encoder enc = new Encoder(a, b);

    }
//Return the distance as pidGet
    public double pidGet() {

        return enc.getDistance();

    }

}
__________________
Checkout my new blog! >> www.netopyaplanet.com
~yay
Reply With Quote