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


Latest Current Affairs 2024 Online Exam Quiz for One day Exam Online Typing Test CCC Online Test 2024 Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Sarkari Exam Quiz