hIOTron
Created December 10, 2019 © GPL3+

Audio VU Meter using Arduino

A VU meter is a device that displays a description of the signal level in audio equipment.

Audio VU Meter using Arduino

Things used in this project

Story

Read more

Code

Run a program

Arduino
int led[11] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
int input, i;
void setup()
{
  for (i = 0; i < 11; i++)
    pinMode(led[i], OUTPUT);
  //Serial.begin(9600);
}
void loop()
{
  input = analogRead(A0);
  //Serial.println(s);
  input = input / 12;      //By changing the denomintor the sensitivity can be changed
  if (input < 12)
  {
    if (input == 0)
    {
      for (i = 0; i < 11; i++)
      {
        digitalWrite(led[i], LOW);
      }
    }
    else
    {
      for (i = 0; i < input; i++)
      {
        digitalWrite(led[i], HIGH);
        delay(4);
      }
      for (i = i; i < 11; i++)
      {
        digitalWrite(led[i], LOW);
      }
    }
  }
}

Credits

hIOTron

hIOTron

78 projects • 2 followers
hIOTron is an internet of things based company that offers an IoT Platform, products, IoT Solutions, and IoT Training.

Comments