A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.circuitpython.org/projects/ms8607/en/latest/examples.html below:

Website Navigation


Simple test — Adafruit MS8607 Library 1.0 documentation

Simple test

Ensure your device works with this simple test.

examples/ms8607_simpletest.py
 1# SPDX-FileCopyrightText: 2020 Bryan Siepert, written for Adafruit Industries
 2# SPDX-License-Identifier: MIT
 3from time import sleep
 4
 5import board
 6
 7from adafruit_ms8607 import MS8607
 8
 9i2c = board.I2C()  # uses board.SCL and board.SDA
10# i2c = board.STEMMA_I2C()  # For using the built-in STEMMA QT connector on a microcontroller
11sensor = MS8607(i2c)
12
13while True:
14    print("Pressure: %.2f hPa" % sensor.pressure)
15    print("Temperature: %.2f C" % sensor.temperature)
16    print("Humidity: %.2f %% rH" % sensor.relative_humidity)
17    print("\n------------------------------------------------\n")
18    sleep(1)

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4