Commit graph

6 commits

Author SHA1 Message Date
ladyada
a6aba7192f Rename test sketch to fulltest_sths34pf80 with comprehensive documentation
- Renamed test_sths34pf80 to fulltest_sths34pf80 for clarity
- Added detailed header comments explaining the sketch demonstrates all sensor settings
- Uses sensor default values to provide stable API demonstration without unexpected register changes
- Maintains halt-on-error behavior with F() string memory optimization

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-23 17:03:56 -04:00
ladyada
8bd0781af7 Add simple STHS34PF80 demo sketch
- Clean, minimal example showing basic sensor usage
- Always displays ambient temperature in Celsius
- Only shows detection values when events occur (presence, motion, temp shock)
- Only displays object temperatures when presence or motion detected
- 100ms update rate for responsive monitoring

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-23 15:47:46 -04:00
ladyada
cef5e156ec Port STM API functions with enhanced ODR validation and algorithm reset
- Port sths34pf80_tmos_odr_set with comprehensive ODR validation based on averaging settings
- Port sths34pf80_func_cfg_write as writeEmbeddedFunction() with safe power-down procedures
- Port sths34pf80_algo_reset as algorithmReset() for sensor algorithm reset
- Port sths34pf80_tmos_odr_check_safe_set as safeSetOutputDataRate() with proper DRDY handling
- Add proper #define STHS34PF80_EMBEDDED_RESET_ALGO to replace hardcoded 0x2A value
- Implement isConnected() function for chip ID verification (0xD3)
- Add complete data reading functions for all sensor outputs
- Add status flag checking functions (isDataReady, isPresence, isMotion, isTempShock)
- Update test sketch with live sensor readings and continuous monitoring
- Enhance begin() to use recommended default settings and proper initialization

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-23 15:11:39 -04:00
ladyada
354bb82d86 Add complete CTRL3 register support with interrupt configuration
- Add interrupt polarity, output type, and latched mode configuration
- Add interrupt mask support for presence, motion, and ambient shock flags
- Add interrupt signal routing (High-Z, DRDY, INT_OR)
- Add flag definitions for PRES_FLAG, MOT_FLAG, TAMB_SHOCK_FLAG
- Update test sketch with interrupt configuration testing
- All functions tested and verified working with hardware

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-22 18:00:49 -04:00
ladyada
836a63d339 Add complete low-pass filter configuration support
- 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>
2025-06-11 18:19:01 -04:00
ladyada
3aecf50cc8 Initial library implementation for STHS34PF80 infrared sensor
- Add basic library structure with header and implementation files
- Implement constructor, destructor, and begin() method
- Add register definitions with doxygen comments
- Include WHO_AM_I chip identification verification
- Add basic test example sketch
- Verified working on hardware with I2C address 0x5A

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-11 18:01:04 -04:00