Piezo Speaker + Mega

You might have used the wrong pin. A bit confusing with a Mega.
22 and 23 are not the first two pins starting from that corner, but the next pair.
The first pair is not numbered. It's VCC (5volt).
Leo..