# Installing
Stable library from PyPi:
Just run pip install piqmp6988
# PiQmp6988’s Methods
## Constructor(config={})
‘config’ is dictionary type.
### ‘address’
Configure I2C address of QMP6988.
- Address.LOW.value
I2C address is 0x70
Default
- Address.HIGH.value
I2C address is 0x56
### ‘filter’
Configure Infinite Impulse Response(IIR) Filter coefficient of QMP6988.
- Filter.COEFFECT_OFF.value
Do not use IIR Filter
Default
- Filter.COEFFECT_2.value
IIR filter coefficient is 2
- Filter.COEFFECT_4.value
IIR filter coefficient is 4
- Filter.COEFFECT_8.value
IIR filter coefficient is 8
- Filter.COEFFECT_16.value
IIR filter coefficient is 16
- Filter.COEFFECT_32.value
IIR filter coefficient is 32
### ‘mode’
Configure Power Mode of QMP6988.
- Powermode.SLEEP.value
Power Mode is SLEEP
Default
- Powermode.FORCE.value
Power Mode is Force
- Powermode.NORMAL.value
Power Mode is Normal
### ‘pressure’
Configure average times for pressure measurement of QMP6988.
- Oversampling.SKIP.value
Do not measure pressure
Default
- Oversampling.X1.value
Single Shot value
- Oversampling.X2.value
Average 2 times for mesurment value
- Oversampling.X4.value
Average 4 times for mesurment value
- Oversampling.X8.value
Average 8 times for mesurment value
- Oversampling.X16.value
Average 16 times for mesurment value
- Oversampling.X32.value
Average 32 times for mesurment value
- Oversampling.X64.value
Average 64 times for mesurment value
### ‘temperature’
Configure average times for temperature measurement of QMP6988.
- Oversampling.SKIP.value
Do not measure temperature
Use 25.0 celsius value when ‘pressure’ measure
Default
- Oversampling.X1.value
Single Shot value
- Oversampling.X2.value
Average 2 times for mesurment value
- Oversampling.X4.value
Average 4 times for mesurment value
- Oversampling.X8.value
Average 8 times for mesurment value
- Oversampling.X16.value
Average 16 times for mesurment value
- Oversampling.X32.value
Average 32 times for mesurment value
- Oversampling.X64.value
Average 64 times for mesurment value
## read()
Read temperature and pressure. Return value is dictionary type.
### ‘temperature’
- OK
Type: float
Celsius temperature value [℃]
- NG
Type: False
### ‘pressure’
- OK
Type: float
Atmospheric pressure value [hPa]
- NG
Type: False
# Sample
Run sudo pigpiod before running the sample.
## Indoor navigation (from QMP6988 Datasheet)
# -*- coding: utf-8 -*-
import piqmp6988 as QMP6988
import time
config = {
'temperature' : QMP6988.Oversampling.X4.value,
'pressure' : QMP6988.Oversampling.X32.value,
'filter' : QMP6988.Filter.COEFFECT_32.value,
'mode' : QMP6988.Powermode.NORMAL.value
}
obj = QMP6988.PiQmp6988(config)
try:
while True:
value = obj.read()
if (isinstance(value['temperature'], float)):
print("%8.2f" % round(valueb['temperature'], 2))
if (isinstance(valueb['pressure'], float)):
print("%8.2f" % round(valueb['pressure'], 2))
time.sleep(10)
except KeyboardInterrupt:
pass
Metadata
Release files for piqmp6988 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| piqmp6988-1.0.1.tar.gz | 6.5 kB | Without provenance | Details for piqmp6988-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| piqmp6988-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for piqmp6988-1.0.1-py3-none-any.whl |
Total release size: 14.0 kB
Release files / piqmp6988-1.0.1.tar.gz
| Download URL | piqmp6988-1.0.1.tar.gz |
|---|---|
| Size | 6.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1a757fb1408f8c9da2a9299e05280d859777a216fd72685aeded938d1e5e024b
|
|
BLAKE2b-256 checksum How to use checksums |
352094ef3ab59cd1ba4b6b022ee5dcf775bc3a28b35dd3b3b1b3ff086d1d08ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.9
|
Release files / piqmp6988-1.0.1-py3-none-any.whl
| Download URL | piqmp6988-1.0.1-py3-none-any.whl |
|---|---|
| Size | 7.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f39e63223ce74e46ba9404a769f1be8529b749ce8d8a57eba3ef841fb5ea0194
|
|
BLAKE2b-256 checksum How to use checksums |
973ec863ce62190013fbdc84536296be500fb69ddde208ddedc220596b18ae31
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.9
|
Security for piqmp6988 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.