Skip to main content

Shims for the Seeed Grove DHT for the CounterFit virtual IoT device app

Project description

CounterFit Shims - Grove

Grove Shim PyPI

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 telegen-shims-seeed-python-dht
    
  • Import the Grove modules as normal, but using the counterfit_shims_seeed_python_dht package instead of the seeed-python-dht package, as well as importing the TeleGenConnection from the counterfit_shims_grove.counterfit_connection module:

    from counterfit_connection import TeleGenConnection
    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:

    TeleGenConnection.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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

telegen_shims_seeed_python_dht-0.1.0.dev2.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file telegen_shims_seeed_python_dht-0.1.0.dev2.tar.gz.

File metadata

File hashes

Hashes for telegen_shims_seeed_python_dht-0.1.0.dev2.tar.gz
Algorithm Hash digest
SHA256 6da36460a84a01faa1a6d0f69f4f763fcf9f33259669648183915edfebb4f0e4
MD5 4aaee626daa6b99cf8bcc4bfc3eb8049
BLAKE2b-256 cd947993e698d645b375d5405cb2614aa0bec9d4a10e12adc55273372874b9d2

See more details on using hashes here.

File details

Details for the file telegen_shims_seeed_python_dht-0.1.0.dev2-py3-none-any.whl.

File metadata

File hashes

Hashes for telegen_shims_seeed_python_dht-0.1.0.dev2-py3-none-any.whl
Algorithm Hash digest
SHA256 5778747e45eee9a2aa0340faed48a54f1b42b4da448fb8c5e189d3d0c92af3d3
MD5 1485b9bdd118e299d744f4ac12f0d0e3
BLAKE2b-256 7c9c314b80af578c7bad33e01f5072385d56906ec0f5842d5638424e16d83292

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page