From: Yuval Hermelin Date: Tue, 17 Nov 2015 05:24:05 +0000 (-0800) Subject: Add commit because you forgot to do it all along :D X-Git-Url: http://challenge-bot.com/repos/?a=commitdiff_plain;h=refs%2Fheads%2Fyuval%2Fpotentiometer;p=3501%2F2015-FRC-Spark Add commit because you forgot to do it all along :D --- diff --git a/src/org/usfirst/frc3501/RiceCatRobot/subsystems/Arm.java b/src/org/usfirst/frc3501/RiceCatRobot/subsystems/Arm.java index 8d78c8f..d0ff244 100644 --- a/src/org/usfirst/frc3501/RiceCatRobot/subsystems/Arm.java +++ b/src/org/usfirst/frc3501/RiceCatRobot/subsystems/Arm.java @@ -2,15 +2,43 @@ package org.usfirst.frc3501.RiceCatRobot.subsystems; import org.usfirst.frc3501.RiceCatRobot.RobotMap; +import edu.wpi.first.wpilibj.AnalogPotentiometer; import edu.wpi.first.wpilibj.CANJaguar; import edu.wpi.first.wpilibj.command.Subsystem; +import edu.wpi.first.wpilibj.interfaces.Potentiometer; +/** + * We shall create though potentiometer object in this beuty of a class. You shall not pass. + * @author yuvalhermelin + */ public class Arm extends Subsystem { private CANJaguar left, right; + private double initialDegrees; public Arm() { left = new CANJaguar(RobotMap.ARM_LEFT); right = new CANJaguar(RobotMap.ARM_RIGHT); + Potentiometer p = new AnalogPotentiometer(0, 360, 30); + double degrees = p.get(); + initialDegrees = degrees; + } + + /** + * Levels are as follows: + * 0: 10 degrees + * 1: 20 degrees + * 2: 30 degrees + * 3: 40 degrees + * 4: 50 degrees + * 5: 60 degrees + * 6: 70 degrees + * 7: 80 degrees + * 8: 90 degrees + * @param level + */ + public void goToLevel(int level) + { + } public void initDefaultCommand() {