{"id":16991438,"url":"https://github.com/cdfer/ring-buffer-demo-esp32-arduino","last_synced_at":"2025-04-15T15:21:21.634Z","repository":{"id":237878230,"uuid":"795406156","full_name":"CDFER/Ring-Buffer-Demo-ESP32-Arduino","owner":"CDFER","description":"A demo project showcasing the use of FreeRTOS ring buffers on the ESP32 platform with Arduino. This project demonstrates how to create, send, and receive data using ring buffers, providing a basic example for embedded systems development.","archived":false,"fork":false,"pushed_at":"2024-05-05T08:25:22.000Z","size":781,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-28T21:51:06.124Z","etag":null,"topics":["arduino","circular-buffer","data-structure","efficient-data-transfer","esp32","fifo","freertos","real-time-systems","ring-buffer","streaming-data"],"latest_commit_sha":null,"homepage":"","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/CDFER.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}},"created_at":"2024-05-03T08:01:27.000Z","updated_at":"2025-02-01T03:13:26.000Z","dependencies_parsed_at":"2024-05-03T13:17:09.861Z","dependency_job_id":"ed240d84-5a4e-4c4d-ab03-f51f638105dd","html_url":"https://github.com/CDFER/Ring-Buffer-Demo-ESP32-Arduino","commit_stats":null,"previous_names":["cdfer/ring-buffer-demo-esp32-arduino"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CDFER%2FRing-Buffer-Demo-ESP32-Arduino","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CDFER%2FRing-Buffer-Demo-ESP32-Arduino/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CDFER%2FRing-Buffer-Demo-ESP32-Arduino/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CDFER%2FRing-Buffer-Demo-ESP32-Arduino/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CDFER","download_url":"https://codeload.github.com/CDFER/Ring-Buffer-Demo-ESP32-Arduino/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249094939,"owners_count":21211837,"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","circular-buffer","data-structure","efficient-data-transfer","esp32","fifo","freertos","real-time-systems","ring-buffer","streaming-data"],"created_at":"2024-10-14T03:25:54.225Z","updated_at":"2025-04-15T15:21:21.584Z","avatar_url":"https://github.com/CDFER.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"Circular Buffer Demo for ESP32 (Arduino)\n=============================================\n\nThis project is licensed under the MIT License. See the LICENSE file for details.\n\nThis project demonstrates the use of circular buffers for efficient data transfer on the ESP32 board using the Arduino framework. Circular buffers are a type of data structure that stores data in a continuous loop, making them suitable for streaming data and real-time systems.\n\n\nWhat is a Circular Buffer?\n-------------------------\n\u003cimg src=\"./Circular_Buffer_Animation.gif\" alt=\"Circular Buffer Animation\" width=\"50%\" align=\"right\"\u003e\n\nA circular buffer is an array of constant length that stores data in a continuous loop. Data is read from the buffer in a FIFO (first in, first out) manner, meaning that the oldest data is read first. The terms \"circular buffer\" and \"ring buffer\" are often used interchangeably to refer to this type of data structure.\n\n### Benefits\n* Store data in a continuous loop\n* Read data in a FIFO (First-In-First-Out) manner\n* Suitable for streaming data and real-time systems\n* Efficient use of memory\n* Simple implementation\n\n### Limitations\n* Can only store a predetermined maximum number of elements\n* Requires knowledge of the maximum size beforehand\n\n## Code Overview\nThe `ringBufferDemo()` function demonstrates the use of circular buffers for efficient data transfer. It sends a message to the ring buffer, receives data from the ring buffer, and prints the received message to the serial monitor.\n\n\u003cimg src=\"./screenshot.png\" alt=\"Hello, From the Ring Buffer! on a Serial Monitor\" width=\"300\"\u003e\n\n## Run on WokWi ESP32 Emulator\nhttps://wokwi.com/projects/396851809084022785\n\n## Local Setup\n1. Open the project in the Arduino IDE.\n2. Connect your ESP32 board to your computer.\n3. Upload the sketch to the board.\n4. Open the serial monitor to view the output.\n\n## Portability\nThis code is written for the ESP32 board using the Arduino framework, but it should be easily translatable to other Arduino boards that support FreeRTOS and the optional FreeRTOS/ringbuf.h component. Additionally, with some modifications, it should also be possible to use this code with ESP-IDF or other platforms that support FreeRTOS.\n\n### Acknowledgments\nThanks to the FreeRTOS team for their contributions to the FreeRTOS project. Also, thanks to the Espressif IDF team for their documentation on FreeRTOS ring buffers. https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/freertos_additions.html\nCircular Buffer Animation By MuhannadAjjan - Own work, CC BY-SA 4.0\n\n### Raise an Issue\nIf you have any questions or issues, please raise an issue on this repository.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdfer%2Fring-buffer-demo-esp32-arduino","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcdfer%2Fring-buffer-demo-esp32-arduino","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdfer%2Fring-buffer-demo-esp32-arduino/lists"}