Page 1 of 3

ESP32 and LSM9DS1 not compiling

Posted: Mon Sep 18, 2023 3:34 pm
by stefan.erni
Hi Ben

If I add LSM9DS1 component i get an error and I can not compile anymore.

regards

Stefan

Program:
Test_LSM9DS1.fcfx
(40.66 KiB) Downloaded 212 times

Re: ESP32 and LSM9DS1 not compiling

Posted: Wed Sep 27, 2023 11:05 am
by stefan.erni
Hi Ben

With the LSM9DS1 component i can not compile,
and there is a problem if i load the program again, the I2C channel is not longer select

regards

Stefan

Maybe some problem with the channel?
Snag_b8f250.png
Snag_b8f250.png (38.78 KiB) Viewed 4724 times

Re: ESP32 and LSM9DS1 not compiling

Posted: Fri Oct 13, 2023 7:42 am
by stefan.erni
Hi Ben

I removed some unused code in the programm and still i can not compile if the LSM9DS1 is includet.

I suspect something is wrong in the component.

regards

Stefan



Here is the error message

../main/esp-project.c: In function 'FCD_0ea61_LSM9DS1_AccelGyroMagnet1__Write_Register':
../main/esp-project.c:192:10: error: 'FCR_RETVAL' is used uninitialized in this function [-Werror=uninitialized]

../main/esp-project.c: In function 'FCD_0ea61_LSM9DS1_AccelGyroMagnet1__Read_Bearing':
../main/esp-project.c:487:10: error: 'FCR_RETVAL' may be used uninitialized in this function [-Werror=maybe-uninitialized]
MX_UINT8 FCD_0ea61_LSM9DS1_AccelGyroMagnet1__Initialise()

Re: ESP32 and LSM9DS1 not compiling

Posted: Fri Oct 13, 2023 8:43 am
by medelec35
Hi Stefan.
Sorry for the delay.
Thank you for the bug report.

I'm looking into this now.

Re: ESP32 and LSM9DS1 not compiling

Posted: Fri Oct 13, 2023 9:22 am
by medelec35
Hi Stefan
All the compiler errors have been fixed.
The channel issue requires more looking into, but I have attached the updated component, so you can carry on with your project.
Browse to this location using File Explorer, it's hidden by default so just paste the link into your address bar.

Code: Select all

C:\ProgramData\MatrixTSL\FlowcodeV10\Components
Replace the existing file with the attached file.
If Flowcode is already open, then you will need to reload your project for the new components to work
If you run any component updates, then the components you added will be overwritten.
Can you let me know if it works for you, please?

Re: ESP32 and LSM9DS1 not compiling

Posted: Fri Oct 13, 2023 9:34 am
by medelec35
Hi Stefan.
For the channel issue can you try the attached, please.

Re: ESP32 and LSM9DS1 not compiling

Posted: Fri Oct 13, 2023 9:53 am
by medelec35
Does not look like the channel issue has worked, so back to the original statement
The channel issue requires more looking into
It was worth a try.

Re: ESP32 and LSM9DS1 not compiling

Posted: Fri Oct 13, 2023 10:09 am
by stefan.erni
Hi Martin

Thanks Martin. I can compile now.
The channel select is simply for me to work with it for a while.
Just select channel1 when loading the program.

I will test the component to see if the measured values are correct and let you know how it goes.

regards
Stefan

Re: ESP32 and LSM9DS1 not compiling

Posted: Fri Oct 13, 2023 3:35 pm
by stefan.erni
Hi Martin

The LSM9DS1 is working.
From the magnetometer the data looks good.
But the data from Acceloro and Gyro dont look correct.
as if the result is not on the correct place in the 16Bit signet integer and then the +- bit is wrong....
I have also noticed this with the component BMM150. There I read the register and set the two 8bit together to a 16 bit signet integer, then the data was correct.
Snag_7803d0.png
Snag_7803d0.png (325.37 KiB) Viewed 2106 times
only a small hint...you have to pay attention to ... to change (swap) the IF for using it instead of MPU6886
Snag_77bee8.png
Snag_77bee8.png (37 KiB) Viewed 2106 times

Re: ESP32 and LSM9DS1 not compiling

Posted: Mon Dec 18, 2023 10:24 am
by stefan.erni
Hi Martin

The channel issue requires more looking into
Do you already have an idea for a solution for setting the channel every time?

regards

Stefan