MicroPython MS5611 Library¶
ms5611
¶
MicroPython Driver for the TE MS5611 Pressure and Temperature Sensor
Author(s): Jose D. Montoya
-
class micropython_ms5611.ms5611.MS5611(i2c, address: int =
0x77
)[source]¶ Driver for the MS5611 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
MS5611
class. First you will need to import the libraries to use the sensorfrom machine import Pin, I2C from micropython_ms5611 import ms5611
Once this is done you can define your
machine.I2C
object and define your sensor objecti2c = I2C(1, sda=Pin(2), scl=Pin(3)) ms = ms5611.MS5611(i2c)
Now you have access to the attributes
temp = ms.temperature press = ms.pressure