Integrating with robot
Using a motor controller
Spark Max
Programming
Pull in your values using the spark max SparkBase.getAnalog() function. To get the correct value in degrees you need to set the conversion factor properly. To calculate this use (360.0 degrees / 3.3 volts). This will give you a (109.09)degrees per volt conversion factor.
More info can be found here. LINK
Talon FXS
Programming
Pull in your values using the Talon FXS talonFXS.getAnalogVoltage(); function. To get the correct value in degrees you need to multiply this value by a factor. To calculate this use (360.0 degrees / 3.3 volts). This will give you a (109.09)degrees per volt conversion factor.
More info can be found here. LINK
Directly to RIO
Programming
Pull your values into code using the m_analog.getAverageValue() call. After you set up the port with AnalogInput m_analog = new AnalogInput(0);
More info can be found here. LINK
Last updated

