{"id":14437125,"url":"https://github.com/fizban99/microbit_ky038","last_synced_at":"2025-08-26T20:30:48.153Z","repository":{"id":81708947,"uuid":"85682703","full_name":"fizban99/microbit_ky038","owner":"fizban99","description":"Micro:bit micropython library to calibrate a sound sensor KY038","archived":false,"fork":false,"pushed_at":"2021-07-24T16:31:30.000Z","size":3,"stargazers_count":1,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-31T08:01:45.914Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/fizban99.png","metadata":{"files":{"readme":"README.rst","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}},"created_at":"2017-03-21T09:26:48.000Z","updated_at":"2021-07-24T16:31:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"ebfc6666-f363-4564-8998-dc9290610dd2","html_url":"https://github.com/fizban99/microbit_ky038","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fizban99%2Fmicrobit_ky038","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fizban99%2Fmicrobit_ky038/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fizban99%2Fmicrobit_ky038/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fizban99%2Fmicrobit_ky038/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fizban99","download_url":"https://codeload.github.com/fizban99/microbit_ky038/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231071766,"owners_count":18323682,"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":[],"created_at":"2024-08-31T08:00:23.710Z","updated_at":"2024-12-24T08:30:40.742Z","avatar_url":"https://github.com/fizban99.png","language":"Python","funding_links":[],"categories":["编程","🐍 Python"],"sub_categories":["Python","🐍 MicroPython Libraries"],"readme":"micropython library to calibrate and use a sound sensor KY038\n##############################################################\n\nThis library helps calibrating a sound sensor KY038 with the micro:bit. It also provides a clap counter functionality. It assumes the Digital output of the sound sensor is connected to pin0 of the micro:bit. It uses an analog input, since the digital input seems not to be very reliable powering the sensor with 3V. Power and ground of the sensor are also connected to the micro:bit. \n\n\n.. contents::\n\n.. section-numbering::\n\n\nMain features\n=============\n\n* Helps calibrate the sound sensor showing an arrow on the micro:bit indicating the direction to turn the potentiometer\n* Has a clap counter included\n\nLibrary usage\n=============\n\n\ncalibrate()\n+++++++++++\n\n\nInititalizes the calibration routine. The micro:bit will display an arrow indicating the direction that you should be turning the potentiometer with a screwdriver.\n\n.. code-block:: python\n\n   from ky038 import KY038 \n   \n   KY038.calibrate()\n\n\ncount_claps()\n+++++++++++++\n\n\nCount the number of claps or any consecutive sudden sound.\n\n.. code-block:: python\n\n   from ky038 import KY038 \n   \n   KY038.calibrate()\n   while True:\n       print(KY038.count_claps())\n   \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffizban99%2Fmicrobit_ky038","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffizban99%2Fmicrobit_ky038","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffizban99%2Fmicrobit_ky038/lists"}