{"id":16991009,"url":"https://github.com/evert-arias/easybuzzer","last_synced_at":"2025-03-17T09:30:34.354Z","repository":{"id":96190911,"uuid":"105226417","full_name":"evert-arias/EasyBuzzer","owner":"evert-arias","description":"The Beep Library For Arduino","archived":false,"fork":false,"pushed_at":"2024-03-15T08:16:52.000Z","size":6687,"stargazers_count":83,"open_issues_count":12,"forks_count":22,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-02-27T21:50:06.260Z","etag":null,"topics":["arduino","beep","buzzer","esp32","notifications","piezo","piezoelectric","signal","speaker"],"latest_commit_sha":null,"homepage":"https://evert-arias.github.io/EasyBuzzer","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/evert-arias.png","metadata":{"files":{"readme":"docs/README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2017-09-29T03:36:57.000Z","updated_at":"2025-02-26T23:11:25.000Z","dependencies_parsed_at":"2024-10-27T12:48:38.014Z","dependency_job_id":"0d50d4e8-3462-41ce-889f-c4b1c07524a0","html_url":"https://github.com/evert-arias/EasyBuzzer","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evert-arias%2FEasyBuzzer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evert-arias%2FEasyBuzzer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evert-arias%2FEasyBuzzer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evert-arias%2FEasyBuzzer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/evert-arias","download_url":"https://codeload.github.com/evert-arias/EasyBuzzer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243858212,"owners_count":20359253,"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","beep","buzzer","esp32","notifications","piezo","piezoelectric","signal","speaker"],"created_at":"2024-10-14T03:24:33.992Z","updated_at":"2025-03-17T09:30:34.342Z","avatar_url":"https://github.com/evert-arias.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EasyBuzzer\n[![License](http://img.shields.io/:license-mit-blue.svg)](http://doge.mit-license.org)\n\nThe Beep Library For Arduino\n\n**​ This library has been tested on the following devices:**\n\n- Arduino UNO  :ok:\n- Arduino MEGA 2560 :ok:\n- ESP32 :ok:\n\n## What to expect in next updates\n\n- [ ] Support for multiple instances of `EasyBuzzer` Class, making possible to have more than one Buzzer.\n- [ ] Shortcut functions to predefined sounds like; success, error and warning.\n\n## Getting Started\n\n#### Include the library in the sketch\n\n`#include \u003cEasyBuzzer.h\u003e`\n\n#### Set the pin where the buzzer is connected\n\nBy default, the library is configured to use the pin number 4. You may change the default pin number, modifying the value of `DEFAULT_PIN`  in *Config.h* file. To set the pin number on the sketch, call the function `EasyBuzzer.setPin(pin)` on the setup.\n\n```c++\nint pin = 2;\nvoid setup() {\n  EasyBuzzer.setPin(pin);\n};  \n```\n\n#### Run the library\n\n``` c++\nvoid loop() {\n  /* Always call this function in the loop for EasyBuzzer to work. */\n  EasyBuzzer.update();\n};\n```\n\n\n\n## Uses\n\n### Regular Beep\n\nBeep continuously at a given frequency.\n\n```c++\n/* Beep continuously at a given frequency. */\nEasyBuzzer.beep(\n  frequency\t// Frequency in Hertz(HZ).\n);\n```\n\nBeep at a given frequency an specific number of times. \n\n```c++\n/* \n\tBeep at a given frequency an specific number of times. \n\tThe default onDuration and offDuration is set in Config.h file. \n*/\nEasyBuzzer.beep(\n  frequency,\t// Frequency in Hertz(HZ).\n  beeps\t\t// The number of beeps.\n);\n```\n\nBeep at a given frequency an specific number of times, with callback functionality.\n\n```c++\n/* \n\tBeep at a given frequency an specific number of times, with callback functionality. \n\tThe default onDuration and offDuration is set in Config.h file.\n*/\nEasyBuzzer.beep(\n  frequency,\t// Frequency in Hertz(HZ).\n  beeps,\t// The number of beeps.\n  callback\t// [Optional] Function to call when done.\n);\n```\n\n\n\n### Beep Sequence\n\nCreate a sequence of beeps at a given frequency. \n\n```c++\n/* Create a sequence of beeps at a given frequency. */\nEasyBuzzer.beep(\n  frequency,\t\t// Frequency in hertz(HZ).\n  onDuration, \t\t// On Duration in milliseconds(ms).\n  offDuration, \t\t// Off Duration in milliseconds(ms).\n  beeps, \t\t// The number of beeps per cycle.\n  pauseDuration, \t// Pause duration.\n  cycles, \t\t// The number of cycle.\n  callback\t\t// [Optional] Function to call when done.\n);\t\n```\n\n\n\n### Single Beep For A Duration \n\nSingle beep at a given frequency, for an specific duration.\n\n```c++\n/* Single beep. */\nEasyBuzzer.singleBeep(\n  frequency,\t// Frequency in hertz(HZ).\n  duration\t// Duration of the beep in milliseconds(ms).\n);\n```\n\nSingle beep at a given frequency, for an specific duration, with callback functionality.\n\n```c++\n/* Single beep at a given frequency, for an specific duration, with callback functionality. */\nEasyBuzzer.singleBeep(\n  frequency, \t// Frequency in hertz(HZ).\n  duration, \t// Duration of the beep in milliseconds(ms).\n  callback\t// [Optional] Function to call when done.\n);\n```\n\n\n\n### Stop Beeping\n\nUse this function to stop the beeping. You may call this function at all time, everywhere in the code.\n\n```c++\nEasyBuzzer.stopBeep();\n```\n\n\n\n### Modifying the default duration values\n\nThe default duration values are defined in the *Config.h* file. You may change those values on the *Config.h* file or use the provided function to change them.\n\n```c++\nEasyBuzzer.setOnDuration(duration);\t// Set On duration.\nEasyBuzzer.setOffDuration(duration);\t// Set Off duration.\nEasyBuzzer.setPauseDuration(duration);\t// Set Pause duration.\n```\n\n\n\n## Copyright\n\n[MIT](../LICENSE.md) © [Evert Arias](https://evert.ariascode.com/about)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevert-arias%2Feasybuzzer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevert-arias%2Feasybuzzer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevert-arias%2Feasybuzzer/lists"}