You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
294 B
Arduino

#define OUT 11
bool trigger;
int input3 = digitalRead(A3);
void setup() {
pinMode(OUT, OUTPUT);
Serial.begin(9600);
}
void loop() {
Serial.println(input3);
if(input3) {
Serial.println("trigger");
tone(OUT, 550);
}
else {
noTone(OUT);
Serial.println("no");
}
delay(1000);
}