{"id":33145496,"url":"https://github.com/rhubarbdog/microbit-dht11","last_synced_at":"2025-11-20T07:01:33.281Z","repository":{"id":38419690,"uuid":"159582738","full_name":"rhubarbdog/microbit-dht11","owner":"rhubarbdog","description":"a DHT11 class for microbit","archived":false,"fork":false,"pushed_at":"2022-10-03T12:39:40.000Z","size":24,"stargazers_count":5,"open_issues_count":0,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-06-18T23:15:23.286Z","etag":null,"topics":["assembler","dht11","microbit","micropython","sensor","temperature"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rhubarbdog.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}},"created_at":"2018-11-29T00:16:58.000Z","updated_at":"2022-10-01T17:08:04.000Z","dependencies_parsed_at":"2023-01-19T00:50:12.729Z","dependency_job_id":null,"html_url":"https://github.com/rhubarbdog/microbit-dht11","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rhubarbdog/microbit-dht11","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhubarbdog%2Fmicrobit-dht11","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhubarbdog%2Fmicrobit-dht11/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhubarbdog%2Fmicrobit-dht11/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhubarbdog%2Fmicrobit-dht11/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rhubarbdog","download_url":"https://codeload.github.com/rhubarbdog/microbit-dht11/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhubarbdog%2Fmicrobit-dht11/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":285389437,"owners_count":27163377,"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","status":"online","status_checked_at":"2025-11-20T02:00:05.334Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["assembler","dht11","microbit","micropython","sensor","temperature"],"created_at":"2025-11-15T13:00:33.624Z","updated_at":"2025-11-20T07:01:33.275Z","avatar_url":"https://github.com/rhubarbdog.png","language":"Python","funding_links":[],"categories":["🐍 Python"],"sub_categories":["🐍 MicroPython Libraries"],"readme":"\u003ch1\u003eDHT11 - temperature and humidity measurement\u003c/h1\u003e\n\nThis is the code for version 1 microbits and version 2 microbits, version 1 microbits work on pins 0 to 16 inclusive excluding pins 5 and 11 and the is the same for version 2 microbits except they don't also work on pin 16.\non a version 2 microbit for some reason there are a lot of exceptions on reading the sensor, both invald checksum and too few bits, i don't know why this is.\n\nThis sensor uses 1 wire for communication, the receipt of bits is written in assembler, it's the only way i could manage to receive all of the data.\u003cbr/\u003e\u003cbr/\u003e\n\nThere is one user method `.read` this will either return a tuple of valid temperature and humidity data or raise an exception. The only exception to be trapped with a `try:` `except:` block is `DataError`.  The sensor may also raise a `ValueError` for using an unsuitable pin or a general `Exception` if the are issues with the assembler routines.\u003cbr/\u003e\u003cbr/\u003e\n\nThere is some example code at the end of files `version_1.py` and `version_2.py` ,you need to run a REPL session to see the data output.\u003cbr/\u003e\u003cbr/\u003e\n\nThe sensor is wired as following :\n\u003ctable\u003e\n\u003ctr\u003e\u003ctd\u003e\u003ccenter\u003ePin\u003c/center\u003e\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003e\u003ccenter\u003e1\u003c/center\u003e\u003c/td\u003e\u003ctd\u003e3 volts (Vcc)\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003e\u003ccenter\u003e2\u003c/center\u003e\u003c/td\u003e\u003ctd\u003eData IO, this needs a 5k\npull up resistor\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003e\u003ccenter\u003e3\u003c/center\u003e\u003c/td\u003e\u003ctd\u003eNot connected\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003e\u003ccenter\u003e4\u003c/center\u003e\u003c/td\u003e\u003ctd\u003eGround\u003c/td\u003e\u003c/tr\u003e\n\u003c/table\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhubarbdog%2Fmicrobit-dht11","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frhubarbdog%2Fmicrobit-dht11","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhubarbdog%2Fmicrobit-dht11/lists"}