You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Python module for the qwiic bme280 sensor, which is part of the [SparkFun Qwiic Environmental Combo Breakout](https://www.sparkfun.com/products/14348)
11
+
The SparkFun Qwiic BME280 Atmospheric Sensor and BME280/ENS160 Environmental Combo Breakout Boards provide a simple and cost effective solution for adding atmospheric sensing to your project. Implementing a SparkFun Qwiic I2C interface, these sensors can be rapidly added to any project with boards that are part of the SparkFun Qwiic ecosystem.
26
12
27
-
This python package is a port of the existing [SparkFun BME280 Arduino Library](https://github.com/sparkfun/SparkFun_BME280_Arduino_Library)
13
+
This repository implements a Python package for the SparkFun Qwiic BME280. This package works with Python, MicroPython and CircuitPython.
This package can be used in conjunction with the overall [SparkFun qwiic Python Package](https://github.com/sparkfun/Qwiic_Py)
24
+
## About the Package
25
+
26
+
This python package enables the user to access the features of the BME280 via a single Qwiic cable. This includes reading humidity, pressure, altitude, temperature, calibration and more. The capabilities of the BME280 are each demonstrated in the included examples.
30
27
31
28
New to qwiic? Take a look at the entire [SparkFun qwiic ecosystem](https://www.sparkfun.com/qwiic).
32
29
33
-
##Contents
30
+
### Supported SparkFun Products
34
31
35
-
*[Supported Platforms](#supported-platforms)
36
-
*[Dependencies](#dependencies)
37
-
*[Installation](#installation)
38
-
*[Documentation](#documentation)
39
-
*[Example Use](#example-use)
32
+
This Python package supports the following SparkFun qwiic products on Python, MicroPython and Circuit python.
| Python | Linux |[Raspberry Pi](https://www.sparkfun.com/raspberry-pi-5-8gb.html) , [NVIDIA Jetson Orin Nano](https://www.sparkfun.com/nvidia-jetson-orin-nano-developer-kit.html) via the [SparkFun Qwiic SHIM](https://www.sparkfun.com/sparkfun-qwiic-shim-for-raspberry-pi.html)|
> The listed supported platforms and boards are the primary platform targets tested. It is fully expected that this package will work across a wide variety of Python enabled systems.
40
47
41
-
Supported Platforms
42
-
--------------------
43
-
The qwiic BME280 Python package current supports the following platforms:
The first step to using this package is installing it on your system. The install method depends on the python platform. The following sections outline installation on Python, MicroPython and CircuitPython.
52
51
53
-
Documentation
54
-
-------------
55
-
The SparkFun qwiic BME280 module documentation is hosted at [ReadTheDocs](https://qwiic-bme280-py.readthedocs.io/en/latest/?)
52
+
### Python
56
53
57
-
Installation
58
-
-------------
54
+
The package is primarily installed using the `pip` command, downloading the package from the Python Index - "PyPi". Note - the below instructions outline installation an Linux-based (Raspberry Pi) system.
59
55
60
-
### PyPi Installation
61
-
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 commands
56
+
#### PyPi Installation
57
+
58
+
The SparkFun Qwiic BME280 Python package is part of the overall SparkFun Qwiic Python package which is hosted on PyPi. On systems that support PyPi installation via pip, this library is installed using the following commands
62
59
63
60
For all users (note: the user must have sudo privileges):
64
61
```sh
65
-
sudo pip install sparkfun-qwiic-bme280
62
+
sudo pip install sparkfun-qwiic
66
63
```
67
64
For the current user:
68
65
69
66
```sh
70
-
pip install sparkfun-qwiic-bme280
67
+
pip install sparkfun-qwiic
71
68
```
72
-
73
-
### Local Installation
69
+
---
70
+
---
71
+
> [!CAUTION]
72
+
> **TODO** Put together how this works with the new virtual environments used with the latest Python install
73
+
---
74
+
---
75
+
#### Local Installation
74
76
To install, make sure the setuptools package is installed on the system.
75
77
76
78
Direct installation at the command line:
@@ -86,11 +88,34 @@ A package file is built and placed in a subdirectory called dist. This package f
If not already installed, follow the [instructions here](https://docs.micropython.org/en/latest/reference/mpremote.html) to install mpremote on your computer.
95
+
96
+
Connect a device with MicroPython installed to your computer and then install the package directly to your device with mpremote mip.
If not already installed, follow the [instructions here](https://docs.circuitpython.org/projects/circup/en/latest/#installation) to install CircUp on your computer.
103
+
104
+
Ensure that you have the latest version of the SparkFun Qwiic CircuitPython bundle.
105
+
```sh
106
+
circup bundle-add sparkfun/Qwiic_Py
107
+
```
108
+
109
+
Finally, connect a device with CircuitPython installed to your computer and then install the package directly to your device with circup.
110
+
```sh
111
+
circup install --py qwiic_bme280
112
+
```
113
+
91
114
Example Use
92
115
---------------
93
-
See the examples directory for more detailed use examples.
116
+
Below is a quickstart program to print humidity, pressure, altitude, and temperature read from the BME280.
117
+
118
+
See the examples directory for more detailed use examples and [examples/README.md](https://github.com/sparkfun/qwiic_bme280_py/blob/main/examples/README.md) for a summary of the available examples.
Below is a brief summary of each of the example programs included in this repository. To report a bug in any of these examples or to request a new feature or example [submit an issue in our GitHub issues.](https://github.com/sparkfun/qwiic_bme280_py/issues).
3
+
4
+
NOTE: The abnormal numbering of examples is to retain consistency with the Arduino library from which this was ported.
5
+
6
+
## Example 1: Basic Readings
7
+
This example demonstrates basic bringup of the BME280 to extract humidity, pressure, altitude, and temperature.
These methods are invoked via reading their corresponding properties([humidity](https://docs.sparkfun.com/qwiic_bme280_py/classqwiic__bme280_1_1_qwiic_bme280.html#ace5c02deec66d7096a322f68bd19e35d), [pressure](https://docs.sparkfun.com/qwiic_bme280_py/classqwiic__bme280_1_1_qwiic_bme280.html#a169132f58174ba65b2ef1148858a93f7), [altitude_feet](https://docs.sparkfun.com/qwiic_bme280_py/classqwiic__bme280_1_1_qwiic_bme280.html#aa6b842360817379f6c9026767b4c51cb), and [temperature_fahrenheit](https://docs.sparkfun.com/qwiic_bme280_py/classqwiic__bme280_1_1_qwiic_bme280.html#a42eb4ab7f10b8188d9174384feb2e328))
17
+
18
+
## Example 4: Settings
19
+
This example shows how to change the various filter and oversample settings of the BME280. It sets several filtering and oversampling settings and then performs the same readings as in Example 1.
These methods are invoked via reading their corresponding properties ([filter](https://docs.sparkfun.com/qwiic_bme280_py/classqwiic__bme280_1_1_qwiic_bme280.html#abd7049904b69e17438de6c1bfad899b4), [standby_time](https://docs.sparkfun.com/qwiic_bme280_py/classqwiic__bme280_1_1_qwiic_bme280.html#a16991516b62efcb3400ce1a6ead3f8a3), [tempature_oversample](https://docs.sparkfun.com/qwiic_bme280_py/classqwiic__bme280_1_1_qwiic_bme280.html#aaa2c92f61e6c0360c2d480074ed73b3a), [humidity_oversample](https://docs.sparkfun.com/qwiic_bme280_py/classqwiic__bme280_1_1_qwiic_bme280.html#a7b7bf88a522fced77db96301b5fced51), [mode](https://docs.sparkfun.com/qwiic_bme280_py/classqwiic__bme280_1_1_qwiic_bme280.html#aec55ad7625fa470e5f7f4d0e415ec96e))
30
+
31
+
## Example 5: Read All Registers
32
+
This example configures the BME280 to read all measurements. It also displays the BME280's physical memory and what the driver perceives the calibration words to be.
33
+
34
+
This method showcases direct I2C reads as well as the use of the [calibration property](https://docs.sparkfun.com/qwiic_bme280_py/classqwiic__bme280_1_1_qwiic_bme280.html#a61ff5a498e96023a6c82cb99ca6a093b)
0 commit comments