Chief Delphi

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

4239 Mack 18-02-2014 23:18

Help with Encoder
 
We are using an encoder for the first time on our robot. Whenever we try to use it or declare it our robot doesnt work.

Code:

Encoder encoder = new Encoder(3, 4);
That is what we are using for the encoder and to get the values we are using.
Code:

encoder.get();
Can anyone help us set this up or provide a detailed tutorial for using an encoder in java?

EDIT: we have also tried using this.
Code:

Encoder encoder = new Encoder(3,4,false,EncodingType.k4x);

MagiChau 18-02-2014 23:38

Re: Help with Encoder
 
Can you give error outputs or describe what values you are getting from encoder.get()? your initialization of the encoder seems to be fine.

4239 Mack 18-02-2014 23:47

Re: Help with Encoder
 
We don't get any erros and the output we get is 0 no matter how much we rotate the pole its attached too

MichaelB 18-02-2014 23:53

Re: Help with Encoder
 
Between the first two bits of code you need to have encoder.start() somewhere.


All times are GMT -5. The time now is 11:43.

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