jonacappelle / nRF52-IMU

0 stars 0 forks source link

Stop sending values #1

Open parinaz6 opened 3 years ago

parinaz6 commented 3 years ago

Hi, I'm using this code to get ICM20948 to work with nrf52832. I want to get Quaternion values however when I uncomment it in the code it doesn't show any values in PuTTY. With Euler angles values I have a problem, too. When I open up PuTTY it sends values for a short time and then it stops sending any value. Attached is the screenshot of the PuTTY from the beginning and end of the session. I would be grateful if you can help me figure this out. putty1 putty2

jonacappelle commented 3 years ago

Hi,

What I think possibly caused your problem is the NRF_LOG_INFO messages. This is supposed to be non-blocking, so by default, it will skip when there is no space available in the buffer. This code was rapidly written to do some first tests on the accuracy of the ICM20948, so it's certainly possible to encounter some bugs. I added another commit where it prints out the 9-degree DMP rotation vector. I'm using the nRF52832 development kit and it keeps running without any problems. ( dcd598f914b84e3277dfc8a57b515db7503b6abb )

Let me know if this solved your issue!

Best regards, Jona

parinaz6 commented 3 years ago

Thanks for your response. NRF_LOG_ALLOW_OVERFLOW is enabled so the buffer size should not be the problem right? I used the new code that you committed and I'm still facing the issue. I'm not able to see other sensor values and the only one that I can see in the UART is Euler angles values which are stopped after a while. One more thing that I would like to ask is the accuracy flag. As it's written in the driver of the sensor 0 means calibrated and 3 is fully calibrated. Can you help me with the way you calibrated your sensor? I used get and set biases functions in the dmp and it didn't work. I've got stuck and will appreciate any help.

jonacappelle commented 3 years ago

The IMU performs calibration in the background and auto adjusts to changing environments, by reading the "accuracy_flags" defined in "SensorTypes.h" you know which sensors are calibrated. Gyro calibration happens when you leave the sensor still for a couple of seconds, when placing the sensor on each axis for a couple of seconds the accelerometer gets calibrated, by doing a "figure 8" pattern you can calibrate the compass.