Alright so I have downloaded this file
https://github.com/juchong/ADIS16448-RoboRIO-Driver/blob/master/Java/com/analog/adis16448/frc/ADIS16448_IMU.java
Anyways I want to access the method
public synchronized double getAngleY() {
return m_integ_gyro_y;
}
So in my Robot.java file I added the line
SmartDashboard.putNumber("IMU",imu.getAngleY());
Here the except of the code where that is from
package org.usfirst.frc.team3647.robot;
import edu.wpi.first.wpilibj.BuiltInAccelerometer;
import edu.wpi.first.wpilibj.Compressor;
//import edu.wpi.first.wpilibj.DriverStation;
//import edu.wpi.first.wpilibj.CANTalon;
import edu.wpi.first.wpilibj.IterativeRobot;
import edu.wpi.first.wpilibj.command.Command;
import edu.wpi.first.wpilibj.smartdashboard.SendableChooser;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
import edu.wpi.first.wpilibj.command.Command;
import edu.wpi.first.wpilibj.command.Scheduler;
import edu.wpi.first.wpilibj.smartdashboard.*;
import org.usfirst.frc.team3647.auto.*;
import org.usfirst.frc.team3647.subsystems.ADIS16448_IMU;
//import edu.wpi.first.wpilibj.Joystick;
/**
* The VM is configured to automatically run this class, and to call the
* functions corresponding to each mode, as described in the IterativeRobot
* documentation. If you change the name of this class or the package after
* creating this project, you must also update the manifest file in the resource
* directory.
*/
public class Robot extends IterativeRobot {
public static boolean shootTest = false;
public static boolean shootTest1 = false;
Compressor c = new Compressor();
private BuiltInAccelerometer accel = new BuiltInAccelerometer();
ADIS16448_IMU imu=new ADIS16448_IMU();
Command autonomousCommand;
SendableChooser autoChooser;
/**
* This function is run when the robot is first started up and should be
* used for any initialization code.
*/
public void robotInit() {
updateDashboard();
autoChooser = new SendableChooser();
autoChooser.addDefault("Default Autonomous", new Default());
SmartDashboard.putData("Autonomous mode chooser", autoChooser);
System.out.println("The Robot is ready");
}
/**
* This function is called periodically during autonomous
*/
public void autonomousInit(){
//resetAndDisableSystems();
autonomousCommand = (Command) autoChooser.getSelected();
autonomousCommand.start();
}
public void autonomousPeriodic() {
Scheduler.getInstance().run();
updateDashboard();
}
/**
* This function is called periodically during operator control
*/
public void teleopPeriodic() {
// resetAndDisable();
updateDashboard();
LogitechJoystick.controllers();
Drivetrain.arcadeDrive();
ShooterAngleMotor.angleShooter();
BallShooter.shootBalls();
}
/**
* This function is called periodically during test mode
*/
public void testPeriodic() {
}
public void resetAndDisable() {
// BallShooter.LShooter.set(0);
BallShooter.rShooter.set(0);
ShooterAngleMotor.angle.set(0);
// Piston.BallShooterPiston.set(0);
}
public void updateDashboard() {
SmartDashboard.putData("IMUs", imu);
imu.updateTable();
SmartDashboard.putNumber("IMU",imu.getAngleY());
System.out.println(imu.getAngleY());
}
}