special-issue-x/sketches/max_sketch/1_Trigger_Tone/1_Trigger_Tone.ino

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);
}