void setup() {
// put your setup code here, to run once:
pinMode(6, OUTPUT);
pinMode(7,OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
int abc=digitalRead(7);
if(abc==HIGH)
{
tone(6,100);
}else{
noTone(6);
}
}
void setup() {
// put your setup code here, to run once:
pinMode(6, OUTPUT);
pinMode(7,OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
int abc=digitalRead(7);
if(abc==HIGH)
{
tone(6,100);
}else{
noTone(6);
}
}