I am using a Nano33 BLE Sense Rev2 board which has a LPS22HB pressure sensor. I want to enable low pass filter with additional low pass filter (pfa) which is disabled by default in the library which I use. What should I edit in the cpp file to enable it?
Instead of modifying the device library, use the Wire library to send a new value to CTRL_REG1, setting the EN_LPFP bit.
It is easy to implement a low pass filter in your code, too, then you have total control over the filter parameters.
Use this instruction available with the library being used ``int i2cWrite(uint8_t reg, uint8_t val);``` to write to the register the desired changes.
As written, that function has a 'private' access specification. OP would need to change it to 'public'.
I missed that. Thanks for the correction.
Can you help me with the exact no. I need to send?
I want ODR to be 75 Hz, and to do it, I need to write 0101111 in binary to the Ctrl1 register's first 6 bits. Also, how can I change the function to public?
Help the helpers by reading and following the directions in the "How to get the best out of this forum" post. Post your code, using code tags.
Can you open up the .h and .ccp file in your project?
Can you save the .h and .cpp file with your project files?
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.