|
Re: PID question
It looks good at first glance, but you may want to do the dividing trick (especially on I, that usually ends up as a quite small constant) to improve accuracy/speed. I would also make sure to limit the output to 0-254... I can see no way that you can be certain not to exceed the 0-254 range. If you do, the consequences can be dire for both your robot's mechanical well-being, and bystanders' (ask Billfred what a robot arm can do if you're too close... you really don't want to get an uppercut from your robot). A quick Limit_Mix() call is cheap insurance against accidentally causing major robot damage and/or bodily harm.
__________________
Team 1219: 2009 - Mentor
Team 587: 2005 - Animator, 2006-2008 - Team Captain
|