arduino-course/Week 1/Buzzer/Buzzer.ino

15 lines
205 B
Arduino
Raw Permalink Normal View History

2019-11-08 18:24:43 +01:00
// Buzzer
int buzzerPin = 8;
int time = 100;
void setup() {
pinMode(buzzerPin, OUTPUT);
}
void loop() {
digitalWrite(buzzerPin, HIGH);
delay(time);
digitalWrite(buzzerPin, LOW);
delay(time);
}