#include "pitches.h"
int buzzerPin = 8;
int btn = 12;
int btnState = 0;
void setup() {
// put your setup code here, to run once:
pinMode(btn, INPUT);
}
void loop() {
// put your main code here, to run repeatedly:
btnState = digitalRead(btn);
if(btnState){
// tone(buzzerPin, 262, 250);
tone(buzzerPin, NOTE_C4);
}else{
noTone(buzzerPin);
}
}