Here is the schematics of the circuit you should reproduce : You can use double sided tap, to stick the piezzo to a piece of wood, like this : The code is pretty ...