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:¶
- 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 sensorfrom machine import Pin, I2C from micropython_icp10111 import icp10111
Once this is done you can define your
machine.I2C
object and define your sensor objecti2c = 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_pressure(raw_pressure, raw_temperature)[source]¶
Convert an output from a calibrated sensor to a pressure in Pa.