Created
April 25, 2021 13:00
-
-
Save podstawek/691c8688d1aa3e3b7edd1f138000a4e5 to your computer and use it in GitHub Desktop.
One tick every 500 milliseconds: Arduino plays on PC Speaker
This file contains 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
int speakerPin = 26; // speaker on digital pin 26 | |
void setup() { | |
pinMode(speakerPin, OUTPUT); | |
} | |
void loop() { | |
digitalWrite(speakerPin, HIGH); | |
delay(500); | |
digitalWrite(speakerPin, LOW); | |
delay(500); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment