API Reference
adafruit_spa06_003
CircuitPython driver for SPA06-003 temperature and pressure sensor breakout.
Author(s): Tim Cocks
Implementation Notes
Hardware:
Software and Dependencies:
Adafruit CircuitPython firmware for the supported boards: https://circuitpython.org/downloads
Adafruit’s Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
Adafruit’s Register library: https://github.com/adafruit/Adafruit_CircuitPython_Register
- class adafruit_spa06_003.SPA06_003(bus_device: I2CDevice | SPIDevice)
SPA06-003 temperature and pressure sensor breakout CircuitPython driver.
- Parameters:
bus_device – Instance of I2CDevice or SPIDevice
Measurement Rate Options
Constant Name
Value
Description
SPA06_003_RATE_10x001 measurements per second
SPA06_003_RATE_20x012 measurements per second
SPA06_003_RATE_40x024 measurements per second
SPA06_003_RATE_80x038 measurements per second
SPA06_003_RATE_160x0416 measurements per second
SPA06_003_RATE_320x0532 measurements per second
SPA06_003_RATE_640x0664 measurements per second
SPA06_003_RATE_1280x07128 measurements per second
SPA06_003_RATE_25_160x0825/16 samples per second
SPA06_003_RATE_25_80x0925/8 samples per second
SPA06_003_RATE_25_40x0A25/4 samples per second
SPA06_003_RATE_25_20x0B25/2 samples per second
SPA06_003_RATE_250x0C25 samples per second
SPA06_003_RATE_500x0D50 samples per second
SPA06_003_RATE_1000x0E100 samples per second
SPA06_003_RATE_2000x0F200 samples per second
Oversampling Rate Options
Constant Name
Value
Description
SPA06_003_OVERSAMPLE_10x00Single (no oversampling)
SPA06_003_OVERSAMPLE_20x012 times oversampling
SPA06_003_OVERSAMPLE_40x024 times oversampling
SPA06_003_OVERSAMPLE_80x038 times oversampling
SPA06_003_OVERSAMPLE_160x0416 times oversampling
SPA06_003_OVERSAMPLE_320x0532 times oversampling
SPA06_003_OVERSAMPLE_640x0664 times oversampling
SPA06_003_OVERSAMPLE_1280x07128 times oversampling
Interrupt Polarity Options
Constant Name
Value
Description
SPA06_003_INT_ACTIVE_LOW0x00Interrupt active low
SPA06_003_INT_ACTIVE_HIGH0x01Interrupt active high
- chip_id
Chip ID of the sensor
- coeff_ready
Coefficient ready flag
- fifo_interrupt
FIFO interrupt enable flag
- measurement_mode
Measurement mode. Must be one of the MODE constants.
Measurement Mode Options
Constant Name
Value
Description
SPA06_003_MEAS_MODE_IDLE0x00Idle / Stop background measurement
SPA06_003_MEAS_MODE_PRESSURE0x01Pressure measurement (Command Mode)
SPA06_003_MEAS_MODE_TEMPERATURE0x02Temperature measurement (Command Mode)
SPA06_003_MEAS_MODE_CONTINUOUS_PRESSURE0x05Continuous pressure measurement (Background Mode)
SPA06_003_MEAS_MODE_CONTINUOUS_TEMPERATURE0x06Continuous temperature measurement (Background Mode)
SPA06_003_MEAS_MODE_CONTINUOUS_BOTH0x07Continuous pressure and temperature measurement (Background Mode)
- static over_i2c(i2c: I2C, address=SPA06_003_DEFAULT_ADDR)
Initialize SPA06_003 breakout over I2C bus.
- Parameters:
i2c – busio.I2C instance to communicate over
address – The I2C address to use. Defaults to SPA06_003_DEFAULT_ADDR
- Returns:
Initialized SPA06_003 object
- static over_spi(spi: SPI, cs: DigitalInOut)
Initialize SPA06_003 breakout over SPI bus.
- Parameters:
spi – busio.SPI instance to communicate over
cs – DigitalInOut instance to use for chip select
- Returns:
Initialized SPA06_003 object
- property pressure
Pressure in hPa
- pressure_data_ready
Pressure data ready flag
- pressure_interrupt
Pressure interrupt enable flag
- pressure_measure_rate
Pressure measurement rate. Must be one of the RATE constants.
- property pressure_oversampling
Pressure oversampling rate. Must be one of the OVERSAMPLE constants.
- reset()
Performs soft reset on the sensor.
- sensor_ready
Sensor ready flag
- soft_reset_cmd
Soft reset command
- property temperature
Temperature in Celsius
- temperature_data_ready
Temperature data ready flag
- temperature_interrupt
Temperature interrupt enable flag
- temperature_measure_rate
Temperature measurement rate. Must be one of the RATE constants.
- property temperature_oversampling
Temperature oversampling rate. Must be one of the OVERSAMPLE constants.