MicroPython ICP10111 Driver

icp10111

MicroPython Driver for the TDK ICP-10111 Barometric Pressure and Temperature sensor

  • Author(s): Jose D. Montoya

class micropython_icp10111.icp10111.ICP10111(i2c, address: int = 0x63)[source]

Driver for the ICP10111 Sensor connected over I2C.

Parameters:
i2c : I2C

The I2C bus the ICP10111 is connected to.

address : int

The I2C device address. Defaults to 0x63

Raises:

RuntimeError – if the sensor is not found

Quickstart: Importing and using the device

Here is an example of using the ICP10111 class. First you will need to import the libraries to use the sensor

from machine import Pin, I2C
from micropython_icp10111 import icp10111

Once this is done you can define your machine.I2C object and define your sensor object

i2c = I2C(1, sda=Pin(2), scl=Pin(3))
icp10111 = icp10111.ICP10111(i2c)

Now you have access to the attributes

press, temp = icp.measurements
static calculate_conversion_constants(raw_pa, p_lut)[source]

calculate temperature dependent constants

get_conversion_values() None[source]

Get conversion values from the sensor memory

get_pressure(raw_pressure, raw_temperature)[source]

Convert an output from a calibrated sensor to a pressure in Pa.

property measurements : tuple[float, float]

Return Pressure in Pascals and Temperature in Celsius

property operation_mode : str

Sensor operation_mode

Mode

Value

icp10111.LOW_POWER

0x401A

icp10111.NORMAL

0x48A3

icp10111.LOW_NOISE

0x5059

icp10111.ULTRA_LOW_NOISE

0x58E0

reset()[source]

Reset the sensor