Using a DetachedEncoder as a SPARK's feedback sensor
SplineEncoder spline = new SplineEncoder(12);
SparkFlex spark = new SparkFlex(1, MotorType.kBrushless);
SparkFlexConfig sparkConfig = new SparkFlexConfig();
sparkConfig.closedLoop
feedbackSensor(FeedbackSensor.kDetachedAbsoluteEncoder, spline);
// Continue with other configurationusing namespace rev::detached;
using namespace rev::spark;
SplineEncoder m_spline{12};
SparkFlex m_spark{1, SparkFlex::MotorType::kBrushless};
SparkFlexConfig sparkConfig;
sparkConfig.closedLoop
.SetFeedbackSensor(FeedbackSensor::kDetachedAbsoluteEncoder, spline);
// Continue with other configurationLast updated
Was this helpful?

