- Add sths34pf80_lpf_config_t enum for all LPF options (ODR/9 to ODR/800) - Implement 4 LPF function pairs: * setMotionLowPassFilter/getMotionLowPassFilter (LPF1 bits 2:0) * setMotionPresenceLowPassFilter/getMotionPresenceLowPassFilter (LPF1 bits 5:3) * setPresenceLowPassFilter/getPresenceLowPassFilter (LPF2 bits 5:3) * setTemperatureLowPassFilter/getTemperatureLowPassFilter (LPF2 bits 2:0) - Add comprehensive test example with printLPFSetting helper function - Verified all functions working on hardware with proper register bit manipulation 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
44 lines
1.1 KiB
Text
44 lines
1.1 KiB
Text
Adafruit STHS34PF80 test!
|
|
Address 0x5A Detected
|
|
I2CWRITE @ 0x5A :: 0xF,
|
|
I2CREAD @ 0x5A :: 0xD3,
|
|
STHS34PF80 Found!
|
|
|
|
--- Low-Pass Filter Tests ---
|
|
Available options: ODR/9, ODR/20, ODR/50, ODR/100, ODR/200, ODR/400, ODR/800
|
|
|
|
1. Motion LPF:
|
|
I2CWRITE @ 0x5A :: 0xC,
|
|
I2CREAD @ 0x5A :: 0x8,
|
|
I2CWRITE @ 0x5A :: 0xC, 0x8, STOP
|
|
Set to ODR/9 - Success
|
|
Current setting: I2CWRITE @ 0x5A :: 0xC,
|
|
I2CREAD @ 0x5A :: 0x8,
|
|
ODR/9
|
|
|
|
2. Motion+Presence LPF:
|
|
I2CWRITE @ 0x5A :: 0xC,
|
|
I2CREAD @ 0x5A :: 0x8,
|
|
I2CWRITE @ 0x5A :: 0xC, 0x8, STOP
|
|
Set to ODR/20 - Success
|
|
Current setting: I2CWRITE @ 0x5A :: 0xC,
|
|
I2CREAD @ 0x5A :: 0x8,
|
|
ODR/20
|
|
|
|
3. Presence LPF:
|
|
I2CWRITE @ 0x5A :: 0xD,
|
|
I2CREAD @ 0x5A :: 0x13,
|
|
I2CWRITE @ 0x5A :: 0xD, 0x13, STOP
|
|
Set to ODR/50 - Success
|
|
Current setting: I2CWRITE @ 0x5A :: 0xD,
|
|
I2CREAD @ 0x5A :: 0x13,
|
|
ODR/50
|
|
|
|
4. Temperature LPF:
|
|
I2CWRITE @ 0x5A :: 0xD,
|
|
I2CREAD @ 0x5A :: 0x13,
|
|
I2CWRITE @ 0x5A :: 0xD, 0x13, STOP
|
|
Set to ODR/100 - Success
|
|
Current setting: I2CWRITE @ 0x5A :: 0xD,
|
|
I2CREAD @ 0x5A :: 0x13,
|
|
ODR/100
|