everything works independitly but not together. Piezo not generating a tone
You connected the piezo to pin 1? Chose other pin. Pin 1 is Serial TX. You 'pump' PWM to USB.

tone() function will make sound no matter if you have a delay there. You set 1 sec with 1000 as third parameter. It will sound 1 sec and the turn of. You do not need the delay() and noTone().

500 is low frequency. If it sounds only one second, can you catch it?

try tone(TONE_PIN, 4500, 500). with speaker it is a nice beeeep