stm32duino / LSM6DSOX

Arduino library to support the LSM6DSOX 3D accelerometer and 3D gyroscope
27 stars 16 forks source link

Applying filters. #23

Closed alvaro-oliver closed 1 year ago

alvaro-oliver commented 1 year ago

I can't figure out how to enable and configure a filter. Could you please point me the way to enable a low pass filter on the gyroscope? Thanks

cparata commented 1 year ago

Hello @alvaro-oliver , as you can see in the datasheet of the component (section 6.4.2), a LPF2 is already active in the digital chain of the sensor. So, the output data are already filtered. If you want, you can activate also a HPF and a LPF1, but we did not export explicit APIs to do it. Anyway, you can use "Read_Reg" and "Write_Reg" APIs to configure the registers of the component and so you can use them also to configure the HPF and LPF1 filters, following the instructions in the datasheet. Best Regards, Carlo

alvaro-oliver commented 1 year ago

Thanks Carlo, I'm going to give it a try and comment back. I'm trying to get 416 Hz gyroscope data LP filtered at 24.6 Hz. Regards, Álvaro