{"id":29125620,"url":"https://github.com/stonatm/sparkfun_com-21209","last_synced_at":"2026-05-14T20:31:18.815Z","repository":{"id":300300341,"uuid":"977311599","full_name":"stonatm/SparkFun_COM-21209","owner":"stonatm","description":"SparkFun COM-21209 OWire LED python library","archived":false,"fork":false,"pushed_at":"2025-05-03T22:48:51.000Z","size":280,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-29T22:02:07.244Z","etag":null,"topics":["com-21209","led","micropython","onewire","programmable","python"],"latest_commit_sha":null,"homepage":"","language":"Python","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/stonatm.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,"zenodo":null}},"created_at":"2025-05-03T22:47:49.000Z","updated_at":"2025-05-03T23:46:30.000Z","dependencies_parsed_at":"2025-06-20T23:41:05.969Z","dependency_job_id":null,"html_url":"https://github.com/stonatm/SparkFun_COM-21209","commit_stats":null,"previous_names":["stonatm/sparkfun_com-21209"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/stonatm/SparkFun_COM-21209","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stonatm%2FSparkFun_COM-21209","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stonatm%2FSparkFun_COM-21209/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stonatm%2FSparkFun_COM-21209/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stonatm%2FSparkFun_COM-21209/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stonatm","download_url":"https://codeload.github.com/stonatm/SparkFun_COM-21209/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stonatm%2FSparkFun_COM-21209/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262674930,"owners_count":23346739,"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":["com-21209","led","micropython","onewire","programmable","python"],"created_at":"2025-06-29T22:01:53.905Z","updated_at":"2025-10-07T01:10:16.990Z","avatar_url":"https://github.com/stonatm.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SparkFun OWire LED python library\nMicropython driver for owire led SparkFun COM-21209\n\n## owire_led library\n\nsource file: [owire_led.py](./owire_led.py)\n\n![./led.gif](./led.gif)\n\n---\nInitialize led.\n```\nimport owire_led\ndisp = OWIRE(led_pin)\n```\nparameters:\n\n**led_pin** - pin number where led  is connected.\n\n---\nSet color.\n```\nfunction set_color(color)\n```\nparameters:\n\n**color** - chose color from avialable colors:\n\n```\nOWIRE.RED\nOWIRE.GREEN\nOWIRE.BLUE\nOWIRE.YELLOW\nOWIRE.PURPLE\nOWIRE.CYAN_BLUE\nOWIRE.WHITE\nOWIRE.FULL_COLOR\nOWIRE.R_G_W\nOWIRE.R_B_W\nOWIRE.SIX_COLOR\n```\n\n---\nSet flashing mode.\n```\nfunction set_mode(mode)\n```\n\nparameters:\n\n**mode** - mode number, range **0..7**\n\nmode list:\n\n**0** - static, always on\n\n**1** - 8s getting lighter and darker\n\n**2** - slow X background color flashes white (4s flashes 0.5s)\n\n**3** - 2s wave\n\n**4** - slow speed without background color flash X color (idle 4s, flash 0.5s)\n\n**5** - fast X background color flashes white (1s flash 0.125s)\n\n**6** - slow X background color flashes for 0.5s)\n\n**7** - fast flash x color without background color (1s flash 0.125s)\n\n---\nSet previously chosen color and mode, send data to led.\n\n```\nfunction send_data()\n```\n\n---\n### Example:\n\n```\nimport owire_led\nimport time\n\nled = OWIRE(LED_PIN)\n\nfor led_mode in range(8):\n  # set led mode\n  led.set_mode(led_mode)\n  # set led color and send data to led\n  led.set_color(led.GREEN)\n  led.send_data()\n  time.sleep(8)\n  led.set_color(led.RED)\n  led.send_data()\n  time.sleep(8)\n  led.set_color(led.YELLOW)\n  led.send_data()\n  time.sleep(8)\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstonatm%2Fsparkfun_com-21209","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstonatm%2Fsparkfun_com-21209","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstonatm%2Fsparkfun_com-21209/lists"}