#include #include "pid.h" using namespace std; // test pid int main(int argc, char* argv[]) { // test vars int n; double x, y; double t, dt; pid bob; // setup time t = 0; dt = 0.1; // set PID gains and delta time bob.set(1, 2, 3, dt); // 10 cycles for(n = 0; n < 10; n++) { // arbitrary input x = n + 20; // call once per cycle y = bob.run(x); // show me the money cout << t << " " << x << " " << y << endl; } }