{"id":29448226,"url":"https://github.com/x-croot/buzzerxcr","last_synced_at":"2026-05-15T23:05:23.401Z","repository":{"id":304412529,"uuid":"1018719286","full_name":"X-croot/BuzzerXCR","owner":"X-croot","description":"Arduino buzzer library","archived":false,"fork":false,"pushed_at":"2025-07-12T22:30:29.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-13T00:19:30.958Z","etag":null,"topics":["arduino","arduino-buzzer","arduino-library","buzzer","buzzer-controllers"],"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/X-croot.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":"2025-07-12T22:09:38.000Z","updated_at":"2025-07-12T22:18:24.000Z","dependencies_parsed_at":"2025-07-13T00:19:38.839Z","dependency_job_id":"f44315a2-ad61-4e29-be17-0d4937117872","html_url":"https://github.com/X-croot/BuzzerXCR","commit_stats":null,"previous_names":["x-croot/buzzerxcr"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/X-croot/BuzzerXCR","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/X-croot%2FBuzzerXCR","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/X-croot%2FBuzzerXCR/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/X-croot%2FBuzzerXCR/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/X-croot%2FBuzzerXCR/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/X-croot","download_url":"https://codeload.github.com/X-croot/BuzzerXCR/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/X-croot%2FBuzzerXCR/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33082787,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T20:25:35.270Z","status":"ssl_error","status_checked_at":"2026-05-15T20:25:34.732Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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","arduino-buzzer","arduino-library","buzzer","buzzer-controllers"],"created_at":"2025-07-13T19:01:01.394Z","updated_at":"2026-05-15T23:05:23.396Z","avatar_url":"https://github.com/X-croot.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BuzzerXCR\n\n**BuzzerXCR** is an advanced Arduino library for controlling passive buzzers with extended sound effects, PWM-based volume control, and built-in LED feedback support. Designed for alarms, games, sound indicators, and musical effects, it provides a rich set of features for sound manipulation.\n\n---\n\u003cimg width=\"500\" height=\"300\" alt=\"resim\" src=\"https://github.com/user-attachments/assets/03619163-d2a1-40e9-9b04-14ddf52731a9\" /\u003e\n\n## Features\n\n* Easy-to-use API for passive buzzers\n* Volume control via PWM (optional)\n* LED feedback support (optional)\n* Sound effects:\n\n  * Slow, Normal, Fast **Distortion**\n  * **Fade In** / **Fade Out**\n  * **Glissando** transitions\n  * Scheduled notes\n* Melody playback from arrays\n* Serial Terminal interaction with commands (e.g., `BEEP`, `FREQ 440`, `STOP`)\n* Debug output support for development\n\n---\n\n## Installation\n\n1. Clone or download this repository as a `.zip`\n2. Open Arduino IDE\n3. Go to **Sketch \u003e Include Library \u003e Add .ZIP Library...**\n4. Select the downloaded zip file\n\n---\n\n## Example Usage\n\n```cpp\n#include \u003cBuzzerXCR.h\u003e\n\nBuzzerXCR buzzer(9, 8); // Buzzer pin, LED pin\n\nvoid setup() {\n  buzzer.begin(20);\n  buzzer.setVolume(80);\n  buzzer.sound(NOTE_C4, 500);\n  buzzer.fadeIn(NOTE_E4, 1000);\n  buzzer.distortion(NOTE_C4, NOTE_G4, FAST);\n}\n\nvoid loop() {}\n```\n\n---\n\n## Function Overview\n\n### `begin(int pausePercent)`\n\nSets the pause percentage between notes.\n\n### `end(int ms)`\n\nDelays for `ms` milliseconds at the end of a melody.\n\n### `sound(int note, int duration)`\n\nPlays a tone of given frequency (`note`) and duration (ms).\n\n### `fadeIn(int note, int duration)`\n\nStarts sound from low volume and increases gradually.\n\n### `fadeOut(int note, int duration)`\n\nStarts at full volume and decreases to silence.\n\n### `distortion(int fromNote, int toNote, DistortionSpeed speed)`\n\nCreates a sweeping tone between two notes with chosen speed (`SLOW`, `NORMAL`, `FAST`).\n\n### `glissando(int fromNote, int toNote, int totalDuration)`\n\nSmooth pitch slide between notes.\n\n### `playMelody(const int* notes, const int* durations, int count)`\n\nPlays an array of notes with corresponding durations.\n\n### `vibratePattern(const int* pattern, int count)`\n\nPlays a series of short tones and pauses, simulating vibration.\n\n### `scheduleNote(int note, int duration, int delayMs)`\n\nSchedules a note to play after a specified delay.\n\n### `setVolume(int percent)`\n\nSets the buzzer volume (0–100%) using PWM.\n\n### `enablePWMVolume(bool enable)`\n\nTurns on or off PWM-based volume control.\n\n### `setToneCurve(String curveType)`\n\nSets tone shaping method (e.g., `\"linear\"`).\n\n### `debugMode(bool enable)`\n\nPrints debug messages over Serial when enabled.\n\n### `serialControl(char delimiter)`\n\nReads Serial commands like `BEEP`, `FREQ 440`, `STOP`.\n\n### `toString()`\n\nReturns a string representation of the current BuzzerXCR object state.\n\n---\n\n## Serial Commands (in loop)\n\n* `BEEP` - short beep\n* `FREQ 440` - plays 440 Hz tone\n* `STOP` - stops current tone\n\n```cpp\nvoid loop() {\n  buzzer.serialControl('\\n');\n  delay(10);\n}\n```\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fx-croot%2Fbuzzerxcr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fx-croot%2Fbuzzerxcr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fx-croot%2Fbuzzerxcr/lists"}