Package com.revrobotics
Interface AnalogInput
- All Known Implementing Classes:
SparkAnalogSensor
public interface AnalogInput
Get an instance of this interface by using
SparkBase.getAnalog()
.-
Method Summary
Modifier and TypeMethodDescriptiondouble
Get the position of the sensor.double
Get the voltage of the analog sensor.
-
Method Details
-
getVoltage
double getVoltage()Get the voltage of the analog sensor.- Returns:
- Voltage of the sensor.
-
getPosition
double getPosition()Get the position of the sensor. Returns value in the native unit of 'volt' by default, and can be changed by a scale factor using setPositionConversionFactor().- Returns:
- Position of the sensor
-