Go to Post There's nothing wrong with the loader [dividing by zero], John just misses us 229'ers and wanted everyone to know :-P - Jay Trzaskos [more]
Home
Go Back   Chief Delphi > Technical > Electrical
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #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
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 02:16.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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