"Differential Drive" for a Buzzer using tone()

Hi there!
I will like to add a buzzer to a Photon device and I’m wondering if there’s an elegant way of “differential drive” it using tone().

Thank you for your help

The STM32F205 processor has complementary PWM outputs, however there’s no exposed pair of pins that makes it possible to use, as is.

It is possible to do some low-level software hacking and use two timers, one in complementary mode, to accomplish this, as one user did here:

I don’t think it qualifies as elegant, however.

1 Like

Thank you @rickkas7 for your swift reply.