lesto:
ma dove si blocca il codice? la varibaile delle ISR non diventa mi true?
Ciao Lesto,
il programma stampa un solo valore della variabile x, dopo il quale esce.
A video vedo:
..............................................................
.................................................................
(tutta una serie di confugurazioni...)
DMP ready! Waiting for first data from MPU-6050...
stampa un valore
esce
#ifdef OUTPUT_READABLE_ROLLPITCHYAW
// display Euler angles in degrees
// dmpGetGravity
float grav_x = 2 * ((q_x * q_z) - (q_w * q_y));
float grav_y = 2 * ((q_w * q_x) + (q_y * q_z));
float grav_z = (q_w * q_w) - (q_x * q_x) - (q_y * q_y) + (q_z * q_z);
// roll: (tilt left/right, about X axis)
rpy_rol = atan(grav_y / (sqrt((grav_x * grav_x) + (grav_z * grav_z))));
// pitch: (nose up/down, about Y axis)
rpy_pit = atan(grav_x / (sqrt((grav_y * grav_y) + (grav_z * grav_z))));
// yaw: (rotate around Z axis)
rpy_yaw = atan2((2 * q_x * q_y) - (2 * q_w * q_z), (2 * q_w * q_w) + (2 * q_x * q_x) - 1);
x =rpy_pit * 180/M_PI;
Serial.print("Roll angle [degrees]: ");
// Serial.print(rpy_rol * 180/M_PI); Serial.print("\t");
Serial.print(x); Serial.print("\t");
// Serial.print(rpy_yaw * 180/M_PI); Serial.println();
prima di sostituire all'interrupt l'isr() il programma stampava all'infinito le singole rilevazioni;
sembra che arrivi soltanto un interrupt e dopo, qualche cosa interrompa il programma, ma non riesco a capire dove!