(Solved)My buzzer making weird clicking noise

Hi i have 3.3 v buzzer. But when i program it it's not works.

i wrote for testing:

  tone(2, 1000);
   noTone(2);
   delay(500);
      tone(2,1000 );
   noTone(2);
   delay(500);

what i needed. Buzzer is working beacuse i put this buzzer into my old buzzer piano project it's worked but why is not working now :frowning: so. I cant see any damage on by buzzer. Its new. Also it's works on my other circuits. How i can fix this?

still not working

Wow, a whole 7 minutes and still no-one has fixed it for you? That's terrible!

If it works in different circuits with different code maybe there's a problem in the part of the code you didn't show us or maybe in the wiring you didn't show us either or with whatever Arduino you're using that you told us nothing about.

Steve

Make sure you have a piezo "transducer" or "speaker". A transducer/speaker converts the AC signal to sound. That's what you want.

A "buzzer" or "beeper" is powered from DC voltage and it has it's own built-in sound generator so it won't work with tone() or any audio signal.

Ensure you have a "transducer" or "speaker".

speaker and i fixed the problem i forgot set output to buzzer pin. Problem fixed thanks.

T4h232:
speaker and i fixed the problem i forgot set output to buzzer pin. Problem fixed thanks.

Which we'd have spotted for you in seconds if you'd posted the WHOLE code. Ah well, at least you got it sorted.

Steve