import org.usfirst.frc.team3501.robot.subsystems.Scaler;
import org.usfirst.frc.team3501.robot.subsystems.Shooter;
+import edu.wpi.first.wpilibj.I2C;
import edu.wpi.first.wpilibj.IterativeRobot;
import edu.wpi.first.wpilibj.command.Scheduler;
import edu.wpi.first.wpilibj.smartdashboard.SendableChooser;
SendableChooser positionOneDefense, positionTwoDefense, positionThreeDefense,
positionFourDefense, positionFiveDefense;
+ public static Lidar lidar;
+
@Override
public void robotInit() {
driveTrain = new DriveTrain();
oi = new OI();
shooter = new Shooter();
scaler = new Scaler();
+ lidar = new Lidar(I2C.Port.kOnboard);
// Sendable Choosers allows the driver to select the position of the robot
// and the positions of the defenses from a drop-down menu on the Smart
@Override
public void teleopInit() {
+ lidar.start();
}
@Override
public void teleopPeriodic() {
+ printLidarValues();
Scheduler.getInstance().run();
}
+
+ public void printLidarValues() {
+
+ System.out.println(lidar.pidGet());
+ }
}