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 TypeMethodDescriptiondoubleGet the position of the sensor.doubleGet 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 usingAnalogSensorConfig.positionConversionFactor(double).- Returns:
- Position of the sensor
-