Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sparkfun/qwiic_bme280_py
Python module for the qwiic bme280 sensor
https://github.com/sparkfun/qwiic_bme280_py
python python3 qwiic sensor sparkfun
Last synced: about 1 month ago
JSON representation
Python module for the qwiic bme280 sensor
- Host: GitHub
- URL: https://github.com/sparkfun/qwiic_bme280_py
- Owner: sparkfun
- License: mit
- Created: 2019-06-21T23:27:23.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2023-12-22T23:49:49.000Z (almost 1 year ago)
- Last Synced: 2024-04-15T00:11:18.193Z (8 months ago)
- Topics: python, python3, qwiic, sensor, sparkfun
- Language: Python
- Size: 5.66 MB
- Stars: 10
- Watchers: 5
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Qwiic_BME280_Py
==============
Python module for the qwiic bme280 sensor, which is part of the [SparkFun Qwiic Environmental Combo Breakout](https://www.sparkfun.com/products/14348)
This python package is a port of the existing [SparkFun BME280 Arduino Library](https://github.com/sparkfun/SparkFun_BME280_Arduino_Library)
This package can be used in conjunction with the overall [SparkFun qwiic Python Package](https://github.com/sparkfun/Qwiic_Py)
New to qwiic? Take a look at the entire [SparkFun qwiic ecosystem](https://www.sparkfun.com/qwiic).
## Contents
* [Supported Platforms](#supported-platforms)
* [Dependencies](#dependencies)
* [Installation](#installation)
* [Documentation](#documentation)
* [Example Use](#example-use)Supported Platforms
--------------------
The qwiic BME280 Python package current supports the following platforms:
* [Raspberry Pi](https://www.sparkfun.com/search/results?term=raspberry+pi)
* [NVidia Jetson Nano](https://www.sparkfun.com/products/15297)
* [Google Coral Development Board](https://www.sparkfun.com/products/15318)Dependencies
---------------
This driver package depends on the qwiic I2C driver:
[Qwiic_I2C_Py](https://github.com/sparkfun/Qwiic_I2C_Py)Documentation
-------------
The SparkFun qwiic BME280 module documentation is hosted at [ReadTheDocs](https://qwiic-bme280-py.readthedocs.io/en/latest/?)Installation
-------------### PyPi Installation
This repository is hosted on PyPi as the [sparkfun-qwiic-bme280](https://pypi.org/project/sparkfun-qwiic-bme280/) package. On systems that support PyPi installation via pip, this library is installed using the following commandsFor all users (note: the user must have sudo privileges):
```sh
sudo pip install sparkfun-qwiic-bme280
```
For the current user:```sh
pip install sparkfun-qwiic-bme280
```### Local Installation
To install, make sure the setuptools package is installed on the system.Direct installation at the command line:
```sh
python setup.py install
```To build a package for use with pip:
```sh
python setup.py sdist
```
A package file is built and placed in a subdirectory called dist. This package file can be installed using pip.
```sh
cd dist
pip install sparkfun_qwiic_bme280-.tar.gz
```
Example Use
---------------
See the examples directory for more detailed use examples.```python
import qwiic_bme280
import time
import sysdef runExample():
print("\nSparkFun BME280 Sensor Example 1\n")
mySensor = qwiic_bme280.QwiicBme280()if mySensor.connected == False:
print("The Qwiic BME280 device isn't connected to the system. Please check your connection", \
file=sys.stderr)
returnmySensor.begin()
while True:
print("Humidity:\t%.3f" % mySensor.humidity)print("Pressure:\t%.3f" % mySensor.pressure)
print("Altitude:\t%.3f" % mySensor.altitude_feet)
print("Temperature:\t%.2f" % mySensor.temperature_fahrenheit)
print("")
time.sleep(1)
```