/***
* This method gets you the current voltage of the motor that controls the
- * intake arm. The range of voltage is from [-1,1].
+ * intake arm roller. The range of voltage is from [-1,1].
* A negative voltage makes the motor run backwards.
*
* @return Returns the voltage of the motor that controls the roller. The
return intakeRoller.get();
}
+ /***
+ * This method sets the voltage of the arm motor. The range is from [-1,1]. A
+ * negative voltage makes the direction of the motor go backwards.
+ *
+ * @param voltage
+ * The voltage that you set the motor at. The range of the voltage of
+ * the arm motor is from [-1,1]. A
+ * negative voltage makes the direction of the motor go backwards.
+ */
+
+ public void setArmVoltage(double voltage) {
+ if (voltage > 1)
+ voltage = 1;
+ else if (voltage < -1)
+ voltage = -1;
+
+ intakeArm.set(voltage);
+ }
+
+ /***
+ * This method gets you the current voltage of the motor that controls the
+ * intake arm. The range of voltage is from [-1,1].
+ * A negative voltage makes the motor run backwards.
+ *
+ * @return Returns the voltage of the motor that controls the arm. The
+ * range of the voltage goes from [-1,1].
+ * A negative voltage indicates that the motor is running backwards.
+ */
+
+ public double getArmVoltage() {
+ return intakeArm.get();
+ }
+
/***
* This method checks to see if the presence of the ball inside is true or
* false.