Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Sound Sensor
This is the code to make a LED blink with the music.
int led = 13;
int threshold = 490; //You Can Change This
int volume;
void setup() {
pinMode(led, OUTPUT);
Serial.begin(9600); // For debugging
void loop() {
volume = analogRead(A0); // Reads the value from the Analog PIN A0
digitalWrite(led, HIGH); //Turn ON Led
digitalWrite(led, LOW); // Turn OFF Led
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment