mpl115a2_simpletest.py
1 import time 2 import board 3 import busio 4 import adafruit_mpl115a2 5 6 i2c = busio.I2C(board.SCL, board.SDA) 7 8 mpl = adafruit_mpl115a2.MPL115A2(i2c) 9 10 while True: 11 print("Pressure: {} Temperature: {}".format(mpl.pressure, mpl.temperature)) 12 time.sleep(1)