API Reference

adafruit_sths34pf80

CircuitPython driver for the Adafruit STHS34PF80 IR Presence / Motion Sensor - STEMMA QT / Qwiic

  • Author(s): Liz Clark

Implementation Notes

Hardware:

Software and Dependencies:

class adafruit_sths34pf80.STHS34PF80(i2c: busio.I2C, address: int = DEFAULT_ADDR)

Driver for the STHS34PF80 IR presence and motion sensor.

Parameters:
  • i2c (I2C) – The I2C bus to use

  • address (int) – The I2C device address. Default is 0x5A

property ambient_averaging: int

Ambient temperature averaging configuration

Returns:

Averaging configuration value

property ambient_temperature: float

Read ambient temperature in degrees Celsius

Returns:

Ambient temperature in °C

block_data_update = 32

Block data update configuration (True or False)

compensated_object_temperature = 56

Read compensated object temperature raw value

property data_rate: int

Output data rate configuration

Returns:

Current data rate value

data_ready = 35

Check if new data is ready

property gain_mode: bool

Wide gain mode configuration

Returns:

True if wide mode is enabled

interrupt_latched = 34

Interrupt latched (True or False)

property interrupt_mask: int

Interrupt mask for function status flags

Returns:

Current interrupt mask value

interrupt_open_drain = 34

Set interrupt as open drain (True or False)

interrupt_polarity = 34

Interrupt polarity configuration (True or False)

property interrupt_signal: int

Interrupt signal type configuration

Returns:

Current interrupt signal type

motion = 37

Check if motion is detected

property motion_lpf: int

Motion detection low-pass filter configuration

Returns:

LPF configuration value

property motion_presence_lpf: int

Motion and presence detection low-pass filter configuration

Returns:

LPF configuration value

motion_value = 60

Read motion detection raw value

property object_averaging: int

Object temperature averaging configuration

Returns:

Averaging configuration value

object_temperature = 38

Read raw object temperature value

presence = 37

Check if presence is detected

property presence_lpf: int

Presence detection low-pass filter configuration

Returns:

LPF configuration value

presence_value = 58

Read presence detection raw value

reset() None

Reset the sensor completely

property sensitivity: int

Sensitivity value for ambient temperature compensation

Returns:

Signed 8-bit sensitivity value

property temperature_lpf: int

Ambient temperature shock detection low-pass filter configuration

Returns:

LPF configuration value

temperature_shock = 37

Check if ambient temperature shock is detected

temperature_shock_value = 62

Read ambient temperature shock raw value

property trigger_oneshot: None

Trigger a one-shot measurement