RAMP icon indicating copy to clipboard operation
RAMP copied to clipboard

Problem with using PID_v1.h

Open MxFrs opened this issue 2 years ago • 1 comments

Hi, I'm using a Teensy 4.1 to move a Robotic arm. I implemented a closed loop position systen using the following librarys:

#include <AccelStepper.h>
#include <ams_as5048b.h>
#include <PID_v1.h>

unfortunately, after implementing the Ramp library, the PID library does not work anymore. The outputs of the pid loops become 'NAN'. I'm not extremly familar with coding, so theres no way I could find the issue in a reasonable timespan. Because this problem only occurs when using the Ramp library, I hope you can help me solve this issue.

MxFrs avatar Jun 17 '22 11:06 MxFrs

As far as I can guess the problem will occur with any object library. Because typically object are 'NaN' (not a number). Using the getValue() method should help in this case.

siteswapjuggler avatar Jun 17 '22 12:06 siteswapjuggler