A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.circuitpython.org/projects/lps28/en/latest/api.html below:

Website Navigation


API Reference — Adafruit CircuitPython LPS28 Library 1.0 documentation

API Reference adafruit_lps28

CircuitPython driver for the LPS28 (LPS28DFW) Pressure Sensor

Implementation Notes

Hardware:

Software and Dependencies:

class adafruit_lps28.LPS28(i2c_bus: busio.I2C, address: int = _DEFAULT_ADDR)

Driver for the LPS28 pressure sensor.

Initialize the LPS28 sensor.

Parameters:
  • i2c_bus – The I2C bus instance.

  • address – The I2C address of the sensor (default: 0x5C).

auto_ref_pressure = 1

Enable automatic reference pressure update

auto_zero = 1

Enable auto-zeroing of pressure readings

property averaging: int

Number of pressure and temperature samples to average

Parameters:

value – Desired averaging factor.

Raises:

ValueError – If the provided value is not a valid averaging setting.

property data_rate: int

Output data rate in Hz.

Parameters:

value – Desired data rate in Hz.

Raises:

ValueError – If the provided value is not a valid data rate.

property data_ready: bool

Check if data is ready to be read.

Returns:

True if data is ready

Return type:

bool

data_ready_int = 1

Enable data-ready interrupt

data_ready_pulse = 1

Data-ready interrupt as a pulse

fifo_full_int = 1

Enable FIFO full interrupt

property fifo_mode: str

FIFO mode

Available modes:

‘BYPASS’, ‘FIFO’, ‘CONTINUOUS’, ‘CONTINUOUS_TO_FIFO’, ‘BYPASS_TO_CONTINUOUS’, ‘CONTINUOUS_TO_BYPASS’

Returns:

The current FIFO mode as a string.

Raises:

ValueError – If an invalid FIFO mode is given.

fifo_overrun_int = 1

Enable FIFO overrun interrupt

property fifo_pressure: float

Reads and removes the next FIFO pressure sample in hPa.

Returns:

Pressure value in hPa.

property fifo_ready: bool

Check if FIFO watermark level is reached.

Returns:

True if FIFO watermark level is reached, False otherwise.

fifo_status = 38

FIFO status flags (full, watermark, overrun)

fifo_stop_on_watermark = 1

Stop FIFO when watermark level is reached

fifo_unread_samples = 37

Number of unread FIFO samples (0-127)

fifo_watermark = 21

FIFO watermark threshold (0-127 samples)

fifo_watermark_int = 1

Enable FIFO watermark interrupt

full_scale_mode = 1

Enable full-scale mode (False = 1260 hPa, True = 4060 hPa)

int_pulldown_disable = 1

Disable interrupt pin internal pull-down

int_source = 36

Interrupt source flags

interrupt_pin(polarity: bool, open_drain: bool) None

Configure the interrupt pin settings.

Parameters:
  • polarity – True for active-high, False for active-low.

  • open_drain – True for open-drain output, False for push-pull.

latch_interrupt = 1

Enable latching of interrupt events

lpf_odr9 = 1

Enable low-pass filter with ODR/9 cutoff

property pressure: float

Pressure in hPa.

pressure_high = 1

Enable high-pressure threshold interrupt

pressure_low = 1

Enable low-pressure threshold interrupt

pressure_offset = 24

Pressure offset adjustment (16-bit)

pressure_threshold_int = 1

Enable pressure threshold interrupt

reboot_memory() None

Reboot the memory content of the sensor.

reference_pressure = 22

Reference pressure value (16-bit)

reset() None

Perform a software reset of the sensor.

reset_arp = 1

Reset automatic reference pressure

reset_auto_zero = 1

Reset auto-zeroing function

sda_pullup = 1

Enable I2C SDA pull-up

status = 39

Sensor status flags (pressure/temp ready, overruns)

property temperature: float

Temperature in °C.

threshold_pressure = 12

Pressure threshold for interrupt generation (16-bit value)

trigger_one_shot = 1

Start a one-shot pressure measurement


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4