Mrs Drew-=-http://www.uk-pcb.co.uk - UK PCB Fab CompanyI will design & code for you, but I will also charge you (PM me)If you don't like my answers, realize : I'm not being cheeky, I'm Just trying to prompt you to use your own brain/google etc.

sensor.getMotion6 (&ax, &ay, &az, &gx, &gy, &gz);Calls a function on the sensor library that does something with those 6 variables. Since we already know it's a 3-axis accelerometer and gyroscope, it's probably filling in those variables with 3 accelerations and 3 rotations.

delay (200);It waits for an aeon, since the Arduino is too fast for this simple program.

So to convert that to your different sensor, you would have to find a library function to give you the X acceleration, maybe tweak the values a little to make it fit into 0-180 and then you're ready to test it.

sensor.getMotion6 (&ax, &ay, &az, &gx, &gy, &gz);Calls a function on the sensor library that does something with those 6 variables. Since we already know it's a 3-axis accelerometer and gyroscope, it's probably filling in those variables with 3 accelerations and 3 rotations.

delay (200);It waits for an aeon, since the Arduino is too fast for this simple program.

So to convert that to your different sensor, you would have to find a library function to give you the X acceleration, maybe tweak the values a little to make it fit into 0-180 and then you're ready to test it.

Thank you for the explanation, I have not tested the code, I would want to replace the gyroscope (mpu6050 ) by an other (tinkerkit T000062 ) one and that the program gives the measures of Y (Pitching) forFor my project on the stabilization of the boat .