Pendulum Balance Robot

HazardsMind:
ok then look at this.

const int m = 0;

This should NOT be a constant because you want m to change. And in order to change m, it should be getting the value from "myPID.Compute();"

So it should be,

m = myPID.Compute();

I thought something was wrong with that, however using 'int m - myPID.Compute();' I get an error saying the myPID is not declared in scope, if I put it before this, or 'm' is not declared if I put it afterwards. If i just use 'int m = 0' it says something about 'invalid conversion from 'int' or 'double*'