{"id":27650800,"url":"https://github.com/grgomariani/nvidia-jetson-dht22-python","last_synced_at":"2025-04-24T03:47:52.817Z","repository":{"id":287229612,"uuid":"105515308","full_name":"GrgoMariani/NVidia-Jetson-DHT22-Python","owner":"GrgoMariani","description":"A python library to read temperature and humidity from DHT22 sensor","archived":false,"fork":false,"pushed_at":"2019-07-30T17:18:49.000Z","size":23,"stargazers_count":15,"open_issues_count":0,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-24T03:47:48.253Z","etag":null,"topics":["cython","dht","jetson","python-library"],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GrgoMariani.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-10-02T08:58:15.000Z","updated_at":"2023-07-02T18:12:35.000Z","dependencies_parsed_at":"2025-04-10T17:09:39.925Z","dependency_job_id":"4e641f06-7397-47ae-b054-cf4919088f90","html_url":"https://github.com/GrgoMariani/NVidia-Jetson-DHT22-Python","commit_stats":null,"previous_names":["grgomariani/nvidia-jetson-dht22-python"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GrgoMariani%2FNVidia-Jetson-DHT22-Python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GrgoMariani%2FNVidia-Jetson-DHT22-Python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GrgoMariani%2FNVidia-Jetson-DHT22-Python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GrgoMariani%2FNVidia-Jetson-DHT22-Python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GrgoMariani","download_url":"https://codeload.github.com/GrgoMariani/NVidia-Jetson-DHT22-Python/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250560007,"owners_count":21450168,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cython","dht","jetson","python-library"],"created_at":"2025-04-24T03:47:52.140Z","updated_at":"2025-04-24T03:47:52.806Z","avatar_url":"https://github.com/GrgoMariani.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"## DHT22 NVidia Jetson Python\nA python library to read temperature from your DHT22 sensor connected on GPIO pins of your Jetson Development Kit.\n\n## DHT11 support\nAlso added a DHT11 sensor read - However this should be tested by someone.\n\n## List of supported Jetson boards\n* TX1\n* TX2\n* Xavier\n* Nano\n\nCheck the `jetsonGPIO/jetsonGPIO.h`  for defines. It should be obvious which is which.\n\n### Prerequisites\nInstall python-dev\n```\n sudo apt-get install python-dev\n```\n\nThis repository relies on a fork I made. To clone the repository use:\n```\n git clone --recurse-submodules -j8 https://github.com/GrgoMariani/NVidia-Jetson-DHT22-Python\n```\n\n### Setup\nEdit C_DHT.c to edit the pin number you wish to use to communicate with your DHT22.\nDefault set to:\n ```\n #define PIN0 jetsontx2_pin37  //2-pin from bottom left\n #define PIN1 jetsontx2_pin29  //6-th pin from bottom left\n ```\nIf you don't know the pin numbers google __Jetson gpio pinout tk1/tx1/tx2/xavier__\n\n### Install\nDownload project and install the python library:\n ```\n cd /path/to/this/dir/\n sudo python setup.py build\n sudo python setup.py install\n ```\n\nNow your python library is set up on your Jetson.\n\n### Usage\nTo read sensor enter python as superuser\n\n ```\n sudo python\n ```\n Once in python\n ```python\n import C_DHT\n C_DHT.readSensor(0)        # if used with DHT22, read first sensor\n C_DHT.readSensor(1)        # if used with DHT22, read second sensor\n C_DHT.readSensorDHT11(0)   # if used with DHT11 sensors\n C_DHT.readSensorDHT11(1)   # if used with DHT11 sensors\n ```\n\n\n### Other\nThe library is written in C so it should run faster than python implementation would. DHT22 sends signals which need to be caught every 50 microseconds (not mili, micro).\n\nThe function C_DHT.readSensor(pinNumber) returns (temperature, humidity, 0 or 1) triplet as result.\nIf the last value is 0 the communication failed so try again in 2 seconds. If 1 simply read the temperature and humidity.\n\n\nThe code sets the communication w/ the sensor on its own thread so it minimizes the chances of interrupt.\nDon't expect to get a reading every time you try to call the function. Give it a few times.\n\n~~You can also modify it to read from DHT11 or DHT21 as well.~~ (Done recently)\n\nDatasheet on: https://cdn-shop.adafruit.com/datasheets/Digital+humidity+and+temperature+sensor+AM2302.pdf","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrgomariani%2Fnvidia-jetson-dht22-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrgomariani%2Fnvidia-jetson-dht22-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrgomariani%2Fnvidia-jetson-dht22-python/lists"}