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:

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_1

0x00

1 measurements per second

SPA06_003_RATE_2

0x01

2 measurements per second

SPA06_003_RATE_4

0x02

4 measurements per second

SPA06_003_RATE_8

0x03

8 measurements per second

SPA06_003_RATE_16

0x04

16 measurements per second

SPA06_003_RATE_32

0x05

32 measurements per second

SPA06_003_RATE_64

0x06

64 measurements per second

SPA06_003_RATE_128

0x07

128 measurements per second

SPA06_003_RATE_25_16

0x08

25/16 samples per second

SPA06_003_RATE_25_8

0x09

25/8 samples per second

SPA06_003_RATE_25_4

0x0A

25/4 samples per second

SPA06_003_RATE_25_2

0x0B

25/2 samples per second

SPA06_003_RATE_25

0x0C

25 samples per second

SPA06_003_RATE_50

0x0D

50 samples per second

SPA06_003_RATE_100

0x0E

100 samples per second

SPA06_003_RATE_200

0x0F

200 samples per second

Oversampling Rate Options

Constant Name

Value

Description

SPA06_003_OVERSAMPLE_1

0x00

Single (no oversampling)

SPA06_003_OVERSAMPLE_2

0x01

2 times oversampling

SPA06_003_OVERSAMPLE_4

0x02

4 times oversampling

SPA06_003_OVERSAMPLE_8

0x03

8 times oversampling

SPA06_003_OVERSAMPLE_16

0x04

16 times oversampling

SPA06_003_OVERSAMPLE_32

0x05

32 times oversampling

SPA06_003_OVERSAMPLE_64

0x06

64 times oversampling

SPA06_003_OVERSAMPLE_128

0x07

128 times oversampling

Interrupt Polarity Options

Constant Name

Value

Description

SPA06_003_INT_ACTIVE_LOW

0x00

Interrupt active low

SPA06_003_INT_ACTIVE_HIGH

0x01

Interrupt 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_IDLE

0x00

Idle / Stop background measurement

SPA06_003_MEAS_MODE_PRESSURE

0x01

Pressure measurement (Command Mode)

SPA06_003_MEAS_MODE_TEMPERATURE

0x02

Temperature measurement (Command Mode)

SPA06_003_MEAS_MODE_CONTINUOUS_PRESSURE

0x05

Continuous pressure measurement (Background Mode)

SPA06_003_MEAS_MODE_CONTINUOUS_TEMPERATURE

0x06

Continuous temperature measurement (Background Mode)

SPA06_003_MEAS_MODE_CONTINUOUS_BOTH

0x07

Continuous 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.

adafruit_spa06_003.SPA06_003_I2C(i2c: I2C, address: int = SPA06_003_DEFAULT_ADDR)

SPA06_003_I2C Deprecated fallback driver for warning message.

Parameters:
  • i2c – busio.I2C instance to communicate over

  • address – I2C address to use. Defaults to SPA06_003_DEFAULT_ADDR