Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Encoder code... (http://www.chiefdelphi.com/forums/showthread.php?t=96124)

Mk.32 08-07-2011 21:20

Encoder code...
 
Hello all, more java questions.

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

Quote:

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

Re: Encoder code...
 
Did you call the start method?

Mk.32 09-07-2011 12:37

Re: Encoder code...
 
Oh... No... That might be it. Thanks.


All times are GMT -5. The time now is 22:19.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi