Replies: 2 comments
-
Not sure how I can help here.... |
Beta Was this translation helpful? Give feedback.
0 replies
-
I understand that but a reader maybe ;-) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
`/* Go to your SparkFun library (this is usually Documents\Arduino\libraries\SparkFun_MPU-9250-DMP_Arduino_Library-master)
navigate to src\util and edit the file
inv_mpu.h Somewhere at the beginning of file, just below the line that says
#define INV_MPU_H
add the following line:
#define min(X, Y) (((X) < (Y)) ? (X) : (Y))
//#include <U8g2lib.h> <=== 1
#include <Arduino.h>
#include <SPI.h>
#include <SparkFunMPU9250-DMP.h>
//U8G2_UC1701_MINI12864_F_4W_SW_SPI u8g2(U8G2_R2, / clock=D5*/ 14, /* data=D7*/ 13, /* cs=D8*/ 15, /* dc=D2*/ 2, /* reset=D3*/ 0 );
// ^===================
MPU9250_DMP imu;
void compas1(void){
if (imu.begin() != INV_SUCCESS) {
Serial.println("imu.begin() Failed!");
while (1) {
Serial.println("Unable to communicate with MPU-9250");
Serial.println("Check connections, and try again.");
Serial.println();
delay(5000); } }
Serial.println("imu.begin() succeeded");
imu.dmpBegin(DMP_FEATURE_6X_LP_QUAT | // Enable 6-axis quat
DMP_FEATURE_GYRO_CAL, // Use gyro calibration
10); // Set DMP FIFO rate to 10 Hz
Serial.println("setup() completed");
compas2(); }
void compas2(void){
byte boucle =0;
while (boucle == 0) {
delay(10);
if (imu.fifoAvailable()) {
if (imu.dmpUpdateFifo() == INV_SUCCESS) {
delay(10);
imu.computeEulerAngles();
Serial.println("R/P/Y: " + String(imu.roll) + ", " + String(imu.pitch) + ", " + String(imu.yaw));
} } } }
void setup(void) {
Serial.begin(115200);
//u8g2.begin(); <====================
Wire.begin();
compas1();
}
void loop(void) {
delay(10); }
https://github.com/sparkfun/SparkFun_MPU-9250-DMP_Arduino_Library
This sketch works but if we uncomment
#include <U8g2lib.h> The esp8266 reboot
Sparkfun doesn't seem to be interested in its library anymore and I think it's her who is at fault
line
if (imu.begin() != INV_SUCCESS)
is the cause and if I go to the SparkFunMPU9250-DMP.h library it's on line 46
result = mpu_init(&int_param);
which reboots
mpu_init is in inv_mpu.c
Then I don't know how to track
Thanks for you help
Beta Was this translation helpful? Give feedback.
All reactions