Skip to content

Instantly share code, notes, and snippets.

@vilaca
Created April 20, 2018 19:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vilaca/afea7b6b1c551e146bf308e0893aa55a to your computer and use it in GitHub Desktop.
Save vilaca/afea7b6b1c551e146bf308e0893aa55a to your computer and use it in GitHub Desktop.
/*
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