Programming Examples

Arduino program to interface buzzer with Arduino board to buzz on off with the delay of 1sec


Blink or Glow Led when button press in Arduino

Write a program to interface buzzer with Arduino board to buzz on off with the delay of 1sec

const int BUZZER = 9;//buzzer to arduino pin 9
void setup()
{
  	pinMode(BUZZER, OUTPUT);//7 Set buzzer - pin 9 as an output
}
void loop()
{
  tone(BUZZER, 1000); // Send 1KHz sound signal...
	delay(1000);//for 1 sec
	noTone(BUZZER); //Stop sound...
	delay(1000); //..for 1sec 
}

Output/ Explanation:


Latest Current Affairs 2024 Online Exam Quiz for One day Exam Online Typing Test CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online MBA 2 years Online MCA Online BCA Best Website and Software Company in Allahabad