Go to Post Design is iterative, right? - JesseK [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rating: Thread Rating: 13 votes, 4.69 average. Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 01-29-2011, 08:57 PM
agentace agentace is offline
Registered User
FRC #2522
 
Join Date: Feb 2010
Location: Lynnwood High School
Posts: 8
agentace is an unknown quantity at this point
Java Encoder Problem

I am new to Java, but have a new mentor who is fluent in Java but not the FRC plugins. We have been trying to get the encoders to update their raw values on the Java debugging screen but have been only getting the output of 0.0. We know the encoders work because they work fine in LabVIEW, but not Java. This is the code I have so far:

private Encoder rightEncoder = new Encoder(4,5,4,6,true,CounterBase.EncodingType.k4X) ;
private Encoder leftEncoder = new Encoder(4,7,4,8,true,CounterBase.EncodingType.k4X) ;

and then in teleop periodic:

System.out.println(" le="+leftEncoder.get()
+" re="+rightEncoder.get());

Am I missing anything that would keep the encoders from posting the right values?

Thanks.

Pete
Team 2522
Reply With Quote
 


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 08:10 AM.

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