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


CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online Exam Quiz O Level NIELIT Study material and Quiz Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Best Website and Software Company in Allahabad Website development Company in Allahabad