Class SparkAnalogSensor
java.lang.Object
com.revrobotics.spark.SparkAnalogSensor
- All Implemented Interfaces:
AnalogInput
Get an instance of this class by using
SparkBase.getAnalog().-
Method Summary
Modifier and TypeMethodDescriptionGet the position of the sensor.Get the velocity of the sensor.Get the voltage of the analog sensor.
-
Method Details
-
getVoltage
Get the voltage of the analog sensor.- Specified by:
getVoltagein interfaceAnalogInput- Returns:
- Voltage of the sensor.
-
getPosition
Get the position of the sensor. Returns value in the native unit of 'volt'.- Specified by:
getPositionin interfaceAnalogInput- Returns:
- Position of the sensor
-
getVelocity
-