user3879: I wanted to use a piezo sounder to sound an alarm in an application. Testing indicated that tone() was not very loud.
I could use some external circuitry to swing the pins ±5V but as I have plenty of spare pins, it seemed feasible to use 2 pins driven in anti-phase to increase the power by 4.
I looked at the source Tone.cpp but the code is somewhat intimidating. Before I start to modify it I was wondering if anyone else has already done something like this.

user11606: Yes, Tim Eckel has already published a library "toneAC" on the Arduino website at http://playground.arduino.cc/Code/ToneAC
All of the syntax is there too.

3879: <p>I wanted to use a piezo sounder to sound an alarm in an application. Testing indicated that <code>tone()</code> was not very loud.</p>

<p>I could use some external circuitry to swing the pins ±5V but as I have plenty of spare pins, it seemed feasible to use 2 pins driven in anti-phase to increase the power by 4.</p>

<p>I looked at the source <code>Tone.cpp</code> but the code is somewhat intimidating. Before I start to modify it I was wondering if anyone else has already done something like this.</p>
 11606: <p>Yes, Tim Eckel has already published a library "toneAC" on the Arduino website at <a href="http://playground.arduino.cc/Code/ToneAC" rel="nofollow">http://playground.arduino.cc/Code/ToneAC</a></p>

<p>All of the syntax is there too.</p>
