Last active
December 25, 2020 13:48
-
-
Save donly/d648bffeb515b9af6fffe3c3b6c263b8 to your computer and use it in GitHub Desktop.
An Arduino sample running with buzzer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define BUZZER D6 | |
void setup() { | |
Serial.begin(115200); | |
Serial.println("setup"); | |
pinMode(BUZZER, OUTPUT); | |
digitalWrite(BUZZER,HIGH); | |
} | |
void loop() { | |
buzzer_Di(); | |
} | |
void buzzer_Di() { | |
Serial.println("Bi.."); | |
digitalWrite(BUZZER,LOW); | |
delay(300); | |
digitalWrite(BUZZER,HIGH); | |
delay(300); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment