Created
April 20, 2018 19:25
-
-
Save vilaca/afea7b6b1c551e146bf308e0893aa55a to your computer and use it in GitHub Desktop.
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
/* | |
2 pots 1 speaker | |
BOM | |
Arduino Uno | |
10k A0 | |
10k A1 | |
Pin 13 is output | |
*/ | |
void setup() { | |
pinMode(LED_BUILTIN, OUTPUT); | |
} | |
void loop() { | |
for (int j = 0; j < 5; j++) | |
{ | |
int i = analogRead(1) / 16 ; | |
delay ( i); | |
digitalWrite(LED_BUILTIN, HIGH); | |
delay ( i); | |
digitalWrite(LED_BUILTIN, LOW); | |
} | |
delay (analogRead(0) / 2 ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment