arduino-course/Buzzer/Buzzer.ino

15 lines
205 B
C++

// Buzzer
int buzzerPin = 8;
int time = 100;
void setup() {
pinMode(buzzerPin, OUTPUT);
}
void loop() {
digitalWrite(buzzerPin, HIGH);
delay(time);
digitalWrite(buzzerPin, LOW);
delay(time);
}