Shims for the Seeed Grove DBT for the CounterFit virtual IoT device app
Project description
CounterFit Shims - Grove
Shims for the Seeed Grove DHT digital temperature and humidity sensor to use with the CounterFit virtual IoT device app.
See the Seeed Python DHT Docs for the API documentation.
Getting started
To use these shims, you will need to install CounterFit and have it running, with the appropriate hardware created.
-
Install this package from pip:
pip install counterfit-shims-seeed-python-dht
-
Import the Grove modules as normal, but using the
counterfit_shims_seeed_python_dht
package instead of theseeed-python-dht
package, as well as importing theCounterFitConnection
from thecounterfit_shims_grove.counterfit_connection
module:from counterfit_connection import CounterFitConnection from counterfit_shims_seeed_python_dht import DHT
-
Configure the connection to the CounterFit app. Change the hostname and port to where you are running it:
CounterFitConnection.init('127.0.0.1', 5000)
-
Write your Grove code as usual, setting the pins to match the ones you set in the CounterFit app. To keep to the interface that the
DHT
specifies, only one pin can be passed to the constructor. The sensor assumes the pin given is for the humidity sensor, and the temperature is on the next pin.For example, create a humidity sensor on pin 1, and a temperature sensor on pin 2. Then pass 1 to the
DHT
constructor.sensor =.DHT("11", 1) humi, temp = sensor.read()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file counterfit_shims_seeed_python_dht-0.1.0.dev1-py3-none-any.whl
.
File metadata
- Download URL: counterfit_shims_seeed_python_dht-0.1.0.dev1-py3-none-any.whl
- Upload date:
- Size: 3.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 052a040d22f70be9d025e535c655cee21faaa90c0feb20f443046e6104e0dfb6 |
|
MD5 | 32203885705a72e189e9baa74f83b68d |
|
BLAKE2b-256 | 95182fd8f5fdde1229fd561d2080700c4385d91c25585e3f3ea6b46cb0557bd9 |