Buzzer

From STEAMwiki
Jump to: navigation, search

This code does not require a library.

void setup()
{

}


void loop()
{
  playBuzzer(3);
  delay(1000);
  stopBuzzer(3);
  delay(1000);
}




void playBuzzer(int pin){
  tone(pin,54);
}

void stopBuzzer(int pin){
  noTone(pin);
}