This project is tone generator. We can generate square wawe sound with arduino
If arduino has DAC we can generate sawtooth, triangle and sine wawe.
For generate square wawe ,we can use tone() function.More information about tone() function:
https://www.arduino.cc/en/Reference/Tone
Codes and schematics in attachment
TONE_GENERATOR.ino (910 Bytes)