{"id":25313004,"url":"https://github.com/geekbrother/ledwinker","last_synced_at":"2026-04-04T22:33:15.785Z","repository":{"id":96155214,"uuid":"278640590","full_name":"geekbrother/LedWinker","owner":"geekbrother","description":"Blink LED, change LED state async (without delay) PlatformIO and Arduino library.","archived":false,"fork":false,"pushed_at":"2023-05-19T12:36:16.000Z","size":55,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-11T18:04:29.833Z","etag":null,"topics":["arduino","asynchronous","esp32","esp8266","iot","iot-device","leds","platformio"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/geekbrother.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":"2020-07-10T13:28:46.000Z","updated_at":"2024-05-17T16:50:37.000Z","dependencies_parsed_at":"2025-06-11T17:55:01.345Z","dependency_job_id":null,"html_url":"https://github.com/geekbrother/LedWinker","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/geekbrother/LedWinker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geekbrother%2FLedWinker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geekbrother%2FLedWinker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geekbrother%2FLedWinker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geekbrother%2FLedWinker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/geekbrother","download_url":"https://codeload.github.com/geekbrother/LedWinker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geekbrother%2FLedWinker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31416770,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T20:09:54.854Z","status":"ssl_error","status_checked_at":"2026-04-04T20:09:44.350Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["arduino","asynchronous","esp32","esp8266","iot","iot-device","leds","platformio"],"created_at":"2025-02-13T15:35:27.847Z","updated_at":"2026-04-04T22:33:15.745Z","avatar_url":"https://github.com/geekbrother.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LedWinker\n![Build with PlatformIO](https://img.shields.io/badge/build%20with-PlatformIO-orange?logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB3aWR0aD0iMjUwMCIgaGVpZ2h0PSIyNTAwIiB2aWV3Qm94PSIwIDAgMjU2IDI1NiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWlkWU1pZCI+PHBhdGggZD0iTTEyOCAwQzkzLjgxIDAgNjEuNjY2IDEzLjMxNCAzNy40OSAzNy40OSAxMy4zMTQgNjEuNjY2IDAgOTMuODEgMCAxMjhjMCAzNC4xOSAxMy4zMTQgNjYuMzM0IDM3LjQ5IDkwLjUxQzYxLjY2NiAyNDIuN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Mzc0IDAgMSAxIDAtNC43NDggMi4zNzQgMi4zNzQgMCAwIDEgMCA0Ljc0OHoiIGZpbGw9IiNGRjdGMDAiLz48L3N2Zz4=)\n\nThis is a tiny Platform.io (Arduino) library to control state of LED(s) in async manner.\n\nBlink your LED (FAST or SLOW), ON, OFF. Change LED state in simple async manner without delays or blocking the main thread.\n\n\n## Installation:\n### PlatfromIO:\nYou can install library as a project dependency by adding it to `platformio.ini`:\n```ini\n[env:myenv]\nplatform = ...\nframework = ...\nboard = ...\nlib_deps =\n  LedWinker\n  ...\n```\n\n## Usage:\n### Initialization:\nFirst of all you need to initialize your LED(s) for LedWinker by creating an instance of LedWinker.\nYou need to pass LED GPIO number as a paramater for constructor (see example below).\nYou can initialize as many LEDs as you wish by creating as many instances, they all will work async.\n\n### States:\nYou can change the state of the LED by call `Wink(STATE)` method of the instance. STATE is the ENUM which includes `LED_ON, LED_OFF, LED_FAST, LED_SLOW` states.\nCalling function doesn't hang main thread or make any delay. Changing state(s) will be full async.\n\nYou can get current state by calling `GetState()` method.\n\n### Loop:\nTo work properly library needs to observe the main loop. Thats why you need to call `Loop()` method of each LedWink instance inside main loop() function of the program (see example below).\n\n## Usage example:\n```cpp\n// LedWinker async LED control library usage example.\n//\n// Example program listen for commands from serial console to control the LED.\n// Available commands: ON, OFF, SLOW, FAST\n//\n// Tested with Platform.io and Arduino\n// Author: Max Kalashnikov\n// Git Repo: https://github.com/geekbrother/LedWinker\n\n#include \u003cArduino.h\u003e\n#include \u003cLedWinker.hpp\u003e\n\n\n#define LED_GPIO 13\n// Initialize winker on LED GPIO number\nLedWinker winker(LED_GPIO);\n\n// serial incoming message\nString incoming;\n\nvoid setup() {\n  // put your setup code here, to run once:\n  Serial.begin(9600);\n  Serial.println(\"Start Winkering ;)\");\n  Serial.println(\"Enter one of the state: ON | OFF | SLOW | FAST:\");\n}\n\nvoid loop() {\n  // put your main code here, to run repeatedly:\n  // You need to put winker.Loop() inside your main loop() to observe the changes.\n  winker.Loop();\n\n  // Listen to commands from serial\n  // You can use ON, OFF, FAST (blinking), SLOW (blinking)\n  if (Serial.available() \u003e 0) {\n    // read the incoming\n    incoming = Serial.readString();\n    // say what you got:\n    Serial.println(incoming);\n    // change led state depend on command\n    if (incoming == \"ON\") winker.Wink(LED_ON); // ON LED\n    if (incoming == \"OFF\") winker.Wink(LED_OFF); // OFF LED\n    if (incoming == \"FAST\") winker.Wink(LED_FAST); // Blink Fast\n    if (incoming == \"SLOW\") winker.Wink(LED_SLOW); // Blink Slow\n  } \n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeekbrother%2Fledwinker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeekbrother%2Fledwinker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeekbrother%2Fledwinker/lists"}