Log in

View Full Version : Encoder code...


Mk.32
08-07-2011, 21:20
Hello all, more java questions.

Working with the encoders, after wiring them up. I used the following code.


public static Encoder left_encoder = new Encoder(6,7);

public static void encoder_print() {
System.out.println(left_encoder.get());
}


With all the necessary stuff between.

However it just prints a string of zeros.
Is there something wrong with the code or should I go check my wiring again?

Joe Ross
08-07-2011, 22:26
Did you call the start method?

Mk.32
09-07-2011, 12:37
Oh... No... That might be it. Thanks.