-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RTL8720DN not working with MPU6050 0.6.0 arduino library #131
Comments
Hi @rkuo2000 Thanks for reaching out to us. May I ask if you can elaborate on how it "hang if using RTL8720DN"? Because, after fixing a small If you don't mind, you can also try |
…ty libs - Fix compilation error with issue (Ameba-AIoT#131) - Update Arduino.h to include dtostrf and itoa libraries Verification: - Tested against WiFiSSLClient and Blink example and passed
…ty libs - Fix compilation error with issue (Ameba-AIoT#131) - Update Arduino.h to include dtostrf and itoa libraries Verification: - Tested against WiFiSSLClient and Blink example and passed
) - Fix compilation error with issue (#131) - Update Arduino.h to include dtostrf and itoa libraries Verification: - Tested against WiFiSSLClient and Blink example and passed
Hi,
I changed to use MPU6050 v0.6.0 arduino library.
Board: RTL8720DN (BW16-TypeC)
IDE: Arduino 2.0.0
IMU library : MPU6050 v0.6.0
Sample Code : [MPU6050_DMP6_Teapot.ino](
https://github.com/rkuo2000/Arduino/tree/master/examples/IMU/MPU6050_DMP6_Teapot/MPU6050_DMP6_Teapot.ino
)
Sympton 1. digitalPinToInterrupt(INTERRUPT_PIN) error
digitalPinToInterrupt not supported ?
After commented digitalPinToInterrupt,
Symptom 2. printfloatX error because missing dtostrf
After adding the following into MPU6050.cpp in library
char *dtostrf (double val, signed char width, unsigned char prec, char *sout) {
char fmt[20];
sprintf(fmt, "%%%d.%df", width, prec);
sprintf(sout, fmt, val);
return sout;
}
Sympton 3. successfully upload to RTL8720DN, but hang after mpu6050 initialization
[MPU6050_DMP6_Teapot.ino](https://github.com/rkuo2000/Arduino/blob/master/examples/IMU/MPU6050_DMP6_Teapot/MPU6050_DMP6_Teapot.ino)
Serial Monitor:
Initializing I2C devices...
I suspect it hang at mpu.initialize(); due to I2Cdev driver issue ?
Richard
|
Hi @rkuo2000 Symptom1: digitalPinToInterrupt(INTERRUPT_PIN) error Symptom 2. printfloatX error because missing dtostrf Sympton 3. successfully upload to RTL8720DN, but hang after mpu6050 initialization
PS: I didn't use your code, as it's heavily modified. The code I used is this one
|
…mpatibility - Fix compilation error with issue (Ameba-AIoT#131) - Update variant.h in all boards to add a missing macro Verification: - Tested against WiFiSSLClient and Blink example and passed
…mpatibility - Fix compilation error with issue (Ameba-AIoT#131) - Update variant.h in all boards to add a missing macro Verification: - Tested against WiFiSSLClient and Blink example and passed
Hi @rkuo2000 Please refer to PR #139 for fix to your issues. Also, there are 2 things you need to change on your side,
These 2 fixes are required to compile and run the example correctly, after these fix, the example works fine Please note: All these fixes won't be available in your Arduino package until next release( in a couple weeks), unless you manually copy the changes to your 3.1.4 arduino package. |
@xidameng has provide the solution, processed to closed the issue. |
MPU6050 & MPU9250 are very popular IMUs (3-axis accelerator, 3-axis gyroscope, 3-axis compass)
The Arduino MPU6050 library works well with ESP32, but hang if using RTL8720DN.
https://github.com/ElectronicCats/mpu6050
Could you tell why this I2Cdev.cpp are not compatible with RTL8720DN ? and find a fix to make RTL8720DN working with MPU6050 / MPU9250.
The text was updated successfully, but these errors were encountered: