degree seconds? i thought it would give the degree angle of the arm ...like a potentiometer... (degree/seconds * seconds = degrees ) right?
btw this is the actual code it hasn't been compiled or tested yet just theory...just notepad:
Code:
p2_y=armin;
targetv=armin; //just temporary...
//////get gyro input conv to 8bit
(int)gyroin10bit=Get_Analog_Value(rc_anlg_in01);
gyroval=gyroin10bit/4;
////convert gyro values to usable values....
armaccel=gyroval-127;
///integrate
realv=(armaccel+realv)/time;
time++;
//////////////
if((hicutoff+targetv)>realv>(locutoff+targetv))
{
armout=(targetv-realv)/proportion;
}
pwm03=pwm03+armout;
One more thing... What is this about integral and derivative.... I get the proportional part (basically multiplying by how much change the input produces.."Gain" )
but why integrate the error....i don't get this and how it works ? i read some stuff about how it is an automatic reset which doesn't quite make sense to me...... Also can someone explain the derivative...part...
