Simple test

Ensure your device works with this simple test.

examples/mpl115a2_simpletest.py
 1# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
 2# SPDX-License-Identifier: MIT
 3
 4import time
 5import board
 6import busio
 7import adafruit_mpl115a2
 8
 9i2c = busio.I2C(board.SCL, board.SDA)
10
11mpl = adafruit_mpl115a2.MPL115A2(i2c)
12
13while True:
14    print("Pressure: {}   Temperature: {}".format(mpl.pressure, mpl.temperature))
15    time.sleep(1)