Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to detect the volume? #30

Open
T-vK opened this issue Sep 21, 2021 · 0 comments
Open

How to detect the volume? #30

T-vK opened this issue Sep 21, 2021 · 0 comments

Comments

@T-vK
Copy link

T-vK commented Sep 21, 2021

Is it possible to detect the volume of the line-in signal?

E.g. something like this?

#define LINE_IN_PIN A0;
void loop() {
    int sample = analogRead(LINE_IN_PIN);
    int volume = sample/4096*100; // volume in percent
    Serial.println(volume);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant