MicroPython MMR920 Library¶
mmr902
¶
MicroPython Driver fro the Mitsumi MMR902 Micro Pressure Sensor
Author(s): Jose D. Montoya
-
class micropython_mmr902.mmr902.MMR902(i2c, address: int =
0x65
)[source]¶ Driver for the MMR902 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
MMR902
class. First you will need to import the libraries to use the sensorfrom machine import Pin, I2C from micropython_mmr902 import mmr902
Once this is done you can define your
machine.I2C
object and define your sensor objecti2c = I2C(1, sda=Pin(2), scl=Pin(3)) mmr = mmr902.MMR902(i2c)
Now you have access to the attributes
temp = mmr.temperature