{"id":18745444,"url":"https://github.com/gioblu/agenda","last_synced_at":"2025-04-12T21:32:52.594Z","repository":{"id":23558470,"uuid":"26925920","full_name":"gioblu/Agenda","owner":"gioblu","description":"Scheduler library for Arduino","archived":false,"fork":false,"pushed_at":"2018-07-22T15:35:46.000Z","size":30,"stargazers_count":35,"open_issues_count":2,"forks_count":8,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-26T16:01:42.982Z","etag":null,"topics":["arduino","scheduler"],"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/gioblu.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}},"created_at":"2014-11-20T18:30:23.000Z","updated_at":"2023-09-09T15:07:42.000Z","dependencies_parsed_at":"2022-07-27T04:02:14.557Z","dependency_job_id":null,"html_url":"https://github.com/gioblu/Agenda","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gioblu%2FAgenda","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gioblu%2FAgenda/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gioblu%2FAgenda/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gioblu%2FAgenda/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gioblu","download_url":"https://codeload.github.com/gioblu/Agenda/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248636329,"owners_count":21137428,"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":["arduino","scheduler"],"created_at":"2024-11-07T16:18:07.586Z","updated_at":"2025-04-12T21:32:52.279Z","avatar_url":"https://github.com/gioblu.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"Agenda 1.0 Stable\n======\n\nThere are a lot of scheduler implementations for Arduino on github, I have developed Agenda because I needed an overflow proof implementation non interrupt-driven I could trust for HAB (High Altitude Balloon) launches and home automation experiments. Agenda is immune to `micros()` overflow and it is designed to work rock solid. The big PROs are the high resilience, compatibility with any sort of library and configurable memory consumption. Consider that Agenda, not using interrupts, can likely overshoot requested delays and scheduled executions with long duration tasks. \n\nI have developed the strong belief, after a lot of experience with Arduino compatible embedded systems, that is better to handle a possible delay in task execution (using a non interrupt-driven system like Agenda), than having always chances to get an interruption in the middle of an execution (using interrupt-driven software), that generally leads to execution corruption and unexpected bugs, for example in a strict timed scenario like bit-banging or sensor reading. \n\nFirst you have to instantiate the Agenda object:\n```cpp\nAgenda scheduler;\n```\n\nCall update method at least one per loop cycle:\n```cpp\nscheduler.update();\n```\n\nTo add a function execution to the list of scheduled tasks:\n```cpp\n// Function definition\nvoid blink() {\n  Serial.println(\"Blink!\");\n}\n\nint blink = scheduler.insert(blink, 1000000); // Blink every second \n```\n\nIf you want to execute the task only once pass `true` as third parameter:\n```cpp\nint blink = scheduler.insert(blink, 1000000, true);\n```\n\nIf you want to deactivate the task you added:\n```cpp\nscheduler.deactivate(blink);\n```\n\nIf you want to activate the task:\n```cpp\nscheduler.activate(blink);\n```\n\nIf you want to completely remove it:\n```cpp\nscheduler.remove(blink);\n```\n\nIf you need a delay in your code use these functions:\n```cpp\n// Delay of 1 second while executing tasks when necessary\nscheduler.delay(1000); \n\n// Delay of 100 microseconds while executing tasks when necessary\nscheduler.delay_microseconds(100); \n```\n\n##License\n```cpp\n/* ___   ___   ___        __   ___\n  |   | | __  |___ |\\  | |  \\ |   |\n  |___| |   | |    | \\ | |   ||___|\n  |   | |___| |___ |  \\| |__/ |   | version: 1.0\n  Scheduler library for Arduino\n  Copyright (c) 2013-2016, Giovanni Blu Mitolo\n  gioscarab@gmail.com - www.gioblu.com\n  All rights reserved.\n  \nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License. */\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgioblu%2Fagenda","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgioblu%2Fagenda","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgioblu%2Fagenda/lists"}