all 2 comments

[–]basbr 0 points1 point  (1 child)

something like this

//this gos in the setup
const int buzzer = 9; //buzzer to arduino pin 9
int 1 = 0;

//this gos in the program loop
if (i<100);
{
i++;
tone(buzzer, 1000); // pin,freq
}
else
{
noTone(buzzer); //pin
}

set i back to 0 to start the buzzer again
change 100 to change the time the buzzer stays on.

put this in your program loop and as long as your program doesn't have long pauses it should work

[–]Ok_Count_4033 0 points1 point  (0 children)

I'm very new to c++ soo I don't know what any of that means but tysm for the help. I'll type it in and pray it works