View Single Post
  #1   Spotlight this post!  
Unread 01-02-2012, 20:13
ssirovica's Avatar
ssirovica ssirovica is offline
Programming Captain
AKA: Sasha Sirovica
FRC #1458 (Red Ties)
Team Role: Programmer
 
Join Date: Sep 2011
Rookie Year: 2010
Location: Alamo
Posts: 26
ssirovica is an unknown quantity at this point
Encoder Feedback From Jaguar

Our team has decided to plug an encoder into one of our Jaguars to regulate the speed of our shooter for more accurate results.

However, we are not getting any output from the encoder.

There is potentially a hardware or software issue.

Our Code:
Initialization
PHP Code:
try {
            
rightMotor1 = new CANJaguar(11CANJaguar.ControlMode.kPercentVbus);
            
rightMotor2 = new CANJaguar(12CANJaguar.ControlMode.kPercentVbus); //Change these to id Nums of jaguar!!!!!
            
leftMotor1 = new CANJaguar(13CANJaguar.ControlMode.kPercentVbus);
            
leftMotor2 = new CANJaguar(15CANJaguar.ControlMode.kPercentVbus);
            
rightMotor2.enableControl();


        } catch (
CANTimeoutException ex) {
            
            
ex.printStackTrace();
        } 
and here is our output code
PHP Code:
try {
        
driverStation.println(DriverStationLCD.Line.kUser31"Right Encoder Jaguar: " Double.toString(rightMotor2.getSpeed()));
          } catch (
CANTimeoutException ex) {

            
ex.printStackTrace();
        } 
Hardware wise everything seems to be wired normally except the Index signal which is supposed to go into the Jaguar is left floating because our encoder does not output an Index signal.

Any ideas?
__________________
Computers run on smoke. When you let the smoke out the computer stops working.
Reply With Quote