P I D AND GY80 10 DOF I am running the program for GY80 10 DOF , and runs fine . Date is printed on the serial monitor
How ever I have failed to use this program for my WalkerBot
(walker bot is a Robotic suit that I want to build for 4 years old my grand son He can not walk due to C P )
Unless the PID is not introduced in the program it will not be good for Balancing of the walker Both the program is as under , and my further questions are in comments
I need help Please
I tried to use the Code Control to insert the codes But it did not work , I may be excused for that Please

the codes

  #include &lt;Wire.h&gt;
  #include &lt;GY80.h&gt;

     GY80 sensor = GY80(); //create GY80 instance

  void setup()
  {
    // initialize serial communication at 115200 bits per second:
    Serial.begin(115200);
    sensor.begin();       //initialize sensors
  }

     // How to envelop this program with PID
     // where the gyro output is supposed to maintain the vertical position of the //bot , and the accelerometer will be doing countermeasure of tilts
// unless they both are on a feedback with PID this bot will not balance
//as the servomotors if do not respond in runtime the bot will fall
void loop()
{
    GY80_scaled val = sensor.read_scaled();       //get values from all sensors
    // print out values

    Serial.print("Mag:");                         //magnetometer values
    Serial.print(val.m_x,2);
    Serial.print(',');
    Serial.print(val.m_y,2);
// tried to get some output from here for using in PID but failed
if(val.m_y,2 &gt;2 ||val.m_y,2&lt;0){Serial.print("Output has been managed");}
but there was no output
    Serial.print(',');
    Serial.print(val.m_z,2);
    Serial.print(' ');
    Serial.print("Acc:");                         //accelerometer values
    Serial.print(val.a_x,3);
    Serial.print(',');
    Serial.print(val.a_y,3);
    Serial.print(',');
    Serial.print(val.a_z,3);
    Serial.print(' ');
    Serial.print("Gyro:");                        //gyroscope values
    Serial.print(val.g_x,1);
    Serial.print(',');
    Serial.print(val.g_y,1);
    Serial.print(',');
    Serial.print(val.g_z,1);
    Serial.print(' ');
    Serial.print("P:");                           //pressure values
    Serial.print(val.p,5);
    Serial.print(' ');
    Serial.print("T:");                           //temperature values
    Serial.println(val.t,1);


    delay(250);        // delay in between reads for stability
}
I am sorry, but I may not have understood your post, but I think the problem is your code doesn't work and you don't know why.  I think the problem is with this line:

if(val.m_y,2 &gt;2 ||val.m_y,2&lt;0){


It is because it is not valid code, I suspect its a cut and paste error and should be 

if(val.m_y &gt; 2.0 || val.m_y &lt; 0.0){


the ,2 you use in the print statements specifies the number of digits to print after the decimal point (I think).