|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools |
Rating:
|
Display Modes |
|
#1
|
|||
|
|||
|
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 |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|