{"id":21650802,"url":"https://github.com/muffinking-jpeg/aht20","last_synced_at":"2025-03-20T03:33:44.205Z","repository":{"id":263063709,"uuid":"888129040","full_name":"MuffinKing-jpeg/AHT20","owner":"MuffinKing-jpeg","description":"my implementation of aht20 driver","archived":false,"fork":false,"pushed_at":"2024-11-15T22:11:15.000Z","size":5,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-25T05:27:42.617Z","etag":null,"topics":["aht20","driver","embedded","hal","sensor","stm32"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MuffinKing-jpeg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2024-11-13T21:35:55.000Z","updated_at":"2024-12-14T10:13:02.000Z","dependencies_parsed_at":"2024-11-15T23:18:43.461Z","dependency_job_id":"5505eda5-be4c-4948-8ee2-7aa5afc90e97","html_url":"https://github.com/MuffinKing-jpeg/AHT20","commit_stats":null,"previous_names":["muffinking-jpeg/aht20"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MuffinKing-jpeg%2FAHT20","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MuffinKing-jpeg%2FAHT20/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MuffinKing-jpeg%2FAHT20/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MuffinKing-jpeg%2FAHT20/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MuffinKing-jpeg","download_url":"https://codeload.github.com/MuffinKing-jpeg/AHT20/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244544214,"owners_count":20469639,"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":["aht20","driver","embedded","hal","sensor","stm32"],"created_at":"2024-11-25T07:42:48.233Z","updated_at":"2025-03-20T03:33:44.175Z","avatar_url":"https://github.com/MuffinKing-jpeg.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AHT20\n\nMy implementation of AHT20 driver.\n\n## Usage\n\n1. Init sensor `AHT20_Init();`\n2. Start measuring `AHT20_StartMeasurement();`\n3. **Make delay about 100ms**\n4. Parse data `AHT20_ParseData(\u0026temp,\u0026humidity);`\n\nNote: temp and humidity variables must be **float** type!\n\n### Example\n\nwith stm32 HAL\n\n```C\nfloat temp = 0;\nfloat humidity = 0;\nvoid main() {\n    HAL_Init();\n    /* USER CODE BEGIN Init */\n    AHT20_Init();\n    /* USER CODE END Init */\n    /* Initialize all configured peripherals */\n    MX_I2C1_Init();\n    /* Infinite loop */\n    while (1)\n    {\n        AHT20_StartMeasurement();\n        HAL_Delay(150);\n        AHT20_ParseData(\u0026temp,\u0026humidity);\n        HAL_Delay(5000);\n    }\n}\n```\n\n## Return type\n\nAll functions return `AHT20_ResponseTypeDef`.  \nValues:  \n    AHT20_OK = 0\n    AHT20_ERROR = 1\n    AHT20_BUSY = 2\n    AHT20_BAD_CRC =3\n\n### Explanation\n\n- AHT20_OK if everything is OK.\n- AHT20_ERROR something went wrong.\n- AHT20_BUSY You called `AHT20_ParseData` too early, and chip still measuring.\n- AHT20_BAD_CRC mismatch of CRC.\n\n## CMAKE\n\nIf you are using CMAKE, you can add config to your toolchain.\n\n```cmake\n#Default path. Change tou yours.\nadd_subdirectory(Drivers/AHT20) \ntarget_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE\n    aht20\n)\n```\n\n## Hardware\n\nCore functionality is hardware agnostic. You can add your hardware implementation. By default shipped with STM32 HAL implementation.\n\nYou can change hardware by toggling build params.  \nCMAKE params:\n\n- AHT20_DRIVER_HAL_STM32 - Default, STM32 HAL\n*WIP*\n\n## TODO\n\n- [] DMA and INTERRUPT modes\n- [] Doxygen\n- [] More supported hardware\n  - [] CC13xx/CC11xx\n  - [] MSP430\n  - [] Arduino\n  - [] PI nano SDK\n  ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuffinking-jpeg%2Faht20","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmuffinking-jpeg%2Faht20","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuffinking-jpeg%2Faht20/lists"}