{"id":38535623,"url":"https://github.com/flight/pi-pico-wav-c","last_synced_at":"2026-01-17T07:01:10.458Z","repository":{"id":330712204,"uuid":"1112598640","full_name":"Flight/pi-pico-wav-c","owner":"Flight","description":null,"archived":false,"fork":false,"pushed_at":"2025-12-27T12:05:14.000Z","size":2744,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-29T06:38:45.450Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/Flight.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,"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":"2025-12-08T21:07:03.000Z","updated_at":"2025-12-27T12:05:17.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Flight/pi-pico-wav-c","commit_stats":null,"previous_names":["flight/pi-pico-wav-c"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/Flight/pi-pico-wav-c","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flight%2Fpi-pico-wav-c","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flight%2Fpi-pico-wav-c/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flight%2Fpi-pico-wav-c/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flight%2Fpi-pico-wav-c/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Flight","download_url":"https://codeload.github.com/Flight/pi-pico-wav-c/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flight%2Fpi-pico-wav-c/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28503021,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T06:57:29.758Z","status":"ssl_error","status_checked_at":"2026-01-17T06:56:03.931Z","response_time":85,"last_error":"SSL_read: 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":[],"created_at":"2026-01-17T07:01:08.703Z","updated_at":"2026-01-17T07:01:10.266Z","avatar_url":"https://github.com/Flight.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pico WAV Player (PWM + DMA)\n\nPlays an embedded WAV file out of the RP2040/RP2350 PWM pin (`GPIO0`) using a simple RC filter + speaker. Samples are streamed via DMA paced by a second PWM slice, keeping the CPU mostly idle during playback.\n\n![Sample](sample.jpg)\n\n## Build\n- Configure once: `cmake -S . -B build`\n- Build: `ninja -C build`\n- Output UF2: `build/pico-wav-c.uf2`\n\n## Flash to Pico\n- Hold BOOTSEL on the Pico and plug in USB; a drive named RPI-RP2 appears.\n- Copy `build/pico-wav-c.uf2` to that drive (drag/drop or `cp`).\n- The Pico reboots and begins playing immediately.\n\n## Wiring\n- Connect `GPIO0` through an RC filter (e.g., 10 kΩ + 0.1 µF) into your amplifier/speaker input.\n- Share ground between Pico and amplifier.\n- The PWM slice used for DMA pacing does not require an extra pin.\n\n## Configuration\n- Default audio pin is `GPIO0` (`AUDIO_PIN` in `pico-wav-c.c`). Change it if needed and reflash.\n\n## Converting your own WAV\n- The player supports PCM WAV only (no compression), 8- or 16-bit, mono or stereo. Stereo is downmixed by channel stride; sample rate is played as-is.\n- Recommended: convert to mono 8-bit unsigned PCM to match the PWM wrap (0–255).\n  - Example with ffmpeg: `ffmpeg -i in.wav -ac 1 -ar 16000 -sample_fmt u8 sound.wav`\n- Convert the WAV into a C header:\n  - `xxd -i sound.wav \u003e wav_data.h`\n  - Ensure the header keeps the symbols `wav_data` and `wav_data_len` (rename if needed).\n- Rebuild: `ninja -C build` and reflash the new UF2.\n\n## Notes\n- If playback is silent, double-check: WAV is PCM (not ADPCM/MP3), sample rate is non-zero, and the header file is included as `wav_data.h`.\n- Playback continues with silence once the WAV data ends; reset or power-cycle to replay.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflight%2Fpi-pico-wav-c","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflight%2Fpi-pico-wav-c","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflight%2Fpi-pico-wav-c/lists"}