3

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.

Milliways
  • 1,655
  • 2
  • 18
  • 29

1 Answers1

3

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.

Adrian
  • 108
  • 8