BuzzerPIO_RP2040

Ultrasonic PWM tone generation for passive buzzers using the RP2040 PIO coprocessor.

Author
Ângelo Moisés Alves
Website
https://github.com/angeloINTJ/BuzzerPIO_RP2040
Category
Signal Input/Output
License
MIT
Library Type
Contributed
Architectures
rp2040

Dual state-machine architecture: SM1 generates an ultrasonic PWM carrier (~95 kHz) for distortion-free volume control, SM2 gates it at the audible frequency. Uses only 4 PIO instructions, auto-probes both PIO blocks, zero DMA, zero IRQ handlers. Multi-core safe via hardware spinlock. Coexists with OneWirePIO, DHT22PIO, and CYW43 WiFi. Non-blocking melody sequencing via hardware alarm chain with completion callback. Pause/resume support. Perceptually linear volume curve. Drop-in replacement for v1.x/v2.x.

Downloads

Filename Release Date File Size
BuzzerPIO_RP2040-2.5.0.zip 2026-03-24 36.25 KiB
BuzzerPIO_RP2040-2.1.0.zip 2026-03-23 21.84 KiB
BuzzerPIO_RP2040-1.0.0.zip 2026-03-22 21.20 KiB