{"id":32580968,"url":"https://github.com/daviinacio/arduino-buffer","last_synced_at":"2026-06-24T21:31:16.357Z","repository":{"id":165321278,"uuid":"178753418","full_name":"daviinacio/arduino-buffer","owner":"daviinacio","description":"Buffer library to arduino","archived":false,"fork":false,"pushed_at":"2020-04-03T13:46:24.000Z","size":4574,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-29T16:42:37.647Z","etag":null,"topics":["arduino-library","cpp","cpp-lib","utils-lib"],"latest_commit_sha":null,"homepage":null,"language":"C++","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/daviinacio.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-03-31T23:26:38.000Z","updated_at":"2024-08-27T20:46:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"fb7f5767-4aa4-4f1d-947e-7596d4069a62","html_url":"https://github.com/daviinacio/arduino-buffer","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/daviinacio/arduino-buffer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daviinacio%2Farduino-buffer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daviinacio%2Farduino-buffer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daviinacio%2Farduino-buffer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daviinacio%2Farduino-buffer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daviinacio","download_url":"https://codeload.github.com/daviinacio/arduino-buffer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daviinacio%2Farduino-buffer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34750952,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-24T02:00:07.484Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-library","cpp","cpp-lib","utils-lib"],"created_at":"2025-10-29T16:28:53.511Z","updated_at":"2026-06-24T21:31:16.323Z","avatar_url":"https://github.com/daviinacio.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Arduino Buffer\nThis is a arduino library that helps to buffer values.\n\n## Instalation\n1. Download [the master branch](https://github.com/daviinacio/arduino-buffer/archive/master.zip) from github.\n2. Unzip the file on the arduino library folder\n3. Restart the Arduino IDE\n\n## Features\n- Get buffer averages\n\n## Getting Started\n\n### Create buffer instance\n```C++\nBuffer b = Buffer(length, init);\n```\nor\n```C++\nBuffer b(length, init);\n```\nor\n```C++\nBuffer* b = new Buffer(length, init);\n```\n\n### Constructor\n`Buffer(length, init)` Create a new instance and clear the buffer.\n`length`: Buffer size, `init`: Initial value\n\n\n### Getters\n- `calcAverage()` Calc the buffer average and return the result\n- `getAverage()` Just return the buffer average\n- `getAt(index)` Returns the buffer value by index\n- `empty()` Check if the buffer average is equals the initial value\n\n### Setters\n- `fill(value)` Fill the buffer with the value\n- `insert(value)` Insert a new value to the buffer and calls `calcAverage()`\n- `clear()` Fill the buffer with the initial value\n\n## Example\n```C++\n// Create a instance of Buffer\nBuffer sensorBuffer(10, 0);\n\n// Your sensor read function\nvoid sensorRead(){\n\t// Get a new sensor value\n\tint read = readSensor();\n\t\n\t// Insert the new value on buffer\n\tsensorBuffer.insert(read);\n\t\n\t// Print the sensor average on Serial Monitor\n\tSerial.println(sensorBuffer.getAverage());\n}\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaviinacio%2Farduino-buffer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaviinacio%2Farduino-buffer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaviinacio%2Farduino-buffer/lists"}