Hi Ben
If I add LSM9DS1 component i get an error and I can not compile anymore.
regards
Stefan
Program:
ESP32 and LSM9DS1 not compiling
-
- Valued Contributor
- Posts: 893
- http://meble-kuchenne.info.pl
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 175 times
- Been thanked: 206 times
-
- Valued Contributor
- Posts: 893
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 175 times
- Been thanked: 206 times
Re: ESP32 and LSM9DS1 not compiling
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?
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?
-
- Valued Contributor
- Posts: 893
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 175 times
- Been thanked: 206 times
Re: ESP32 and LSM9DS1 not compiling
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
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()
- Attachments
-
- Test_2.fcfx
- (25.79 KiB) Downloaded 172 times
-
- Matrix Staff
- Posts: 1624
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 576 times
- Been thanked: 543 times
Re: ESP32 and LSM9DS1 not compiling
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.
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?
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
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?
- Attachments
-
- LSM9DS1_AccelGyroMagnet.fcpx
- (8.38 KiB) Downloaded 182 times
Martin
-
- Matrix Staff
- Posts: 1624
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 576 times
- Been thanked: 543 times
Re: ESP32 and LSM9DS1 not compiling
Hi Stefan.
For the channel issue can you try the attached, please.
For the channel issue can you try the attached, please.
- Attachments
-
- LSM9DS1_AccelGyroMagnet.fcpx
- (8.4 KiB) Downloaded 187 times
Martin
-
- Matrix Staff
- Posts: 1624
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 576 times
- Been thanked: 543 times
Re: ESP32 and LSM9DS1 not compiling
Does not look like the channel issue has worked, so back to the original statement
It was worth a try.The channel issue requires more looking into
Martin
-
- Valued Contributor
- Posts: 893
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 175 times
- Been thanked: 206 times
Re: ESP32 and LSM9DS1 not compiling
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
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
-
- Valued Contributor
- Posts: 893
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 175 times
- Been thanked: 206 times
Re: ESP32 and LSM9DS1 not compiling
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.
only a small hint...you have to pay attention to ... to change (swap) the IF for using it instead of MPU6886
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.
only a small hint...you have to pay attention to ... to change (swap) the IF for using it instead of MPU6886
- Attachments
-
- Snag_7a2a5a.png (61.86 KiB) Viewed 4668 times
-
- Valued Contributor
- Posts: 893
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 175 times
- Been thanked: 206 times
Re: ESP32 and LSM9DS1 not compiling
Hi Martin
regards
Stefan
Do you already have an idea for a solution for setting the channel every time?The channel issue requires more looking into
regards
Stefan