View Single Post
  #1   Spotlight this post!  
Unread 01-03-2013, 17:33
arun4444 arun4444 is offline
Registered User
FRC #3760
 
Join Date: Jan 2013
Location: Bronx
Posts: 26
arun4444 has a little shameless behaviour in the past
Encoder Problem.

So i am trying to get these encoders working,

http://www.grayhill.com/web1/images/...ncoder_63r.pdf

Connected pin 1(encoder) to DigitalI/O in digital sidecar Pin Signal 1
Connected pin 2(encoder) to DigitalI/O in digital sidecar Pin Power 1
Connected pin 3(encoder) to DigitalI/O in digital sidecar Pin Signal 2
Connected Pin 5(encoder) to DigitalI/O in digital sidecar Pin ground 3

and here is the java code i am using to test

Code:
 public void disabled(){
        Encoder TestEnc = new Encoder(2,1);
        TestEnc.reset();
        for(;;){
            System.out.println(TestEnc.get());
            Timer.delay(1);
        }
    }
i just keep getting a 0, no matter how much i rotate the encoder, both directions.

I tested the encoder with an arduino and it seems to work fine.

I switched to another digital sidecar and the problem persists.

any ideas?

cheers
arun