Add example for PIDMotorController code

This commit is contained in:
Matt McWilliams 2025-04-21 15:41:23 -04:00
parent 6302520df8
commit 22e4ed7edc
1 changed files with 10 additions and 1 deletions

View File

@ -81,4 +81,13 @@ private:
bool m_firstUpdate;
};
#endif
#endif
/*
PIDMotorController pidController;
pidController.setTargetRPM(1500.0);
// loop()
double currentRPM = readEncoderRPM(); // Your encoder reading function
uint16_t pwmValue = pidController.update(currentRPM);
*/