Skip to content

Commit

Permalink
Remove AnalogResolution(10), and shift data when sampling instead.
Browse files Browse the repository at this point in the history
  • Loading branch information
atuline committed Oct 27, 2021
1 parent 2edbbcf commit 36dfb5c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion wled00/audio_reactive.h
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ void FFTcode( void * parameter) {

for(int i=0; i<samples; i++) {
if ((digitalMic && dmEnabled) == false) {
micData = analogRead(audioPin); // Analog Read
micData = analogRead(audioPin) >> 2; // Analog Read
} else {
int32_t digitalSample = 0;
// TODO: I2S_POP_SAMLE DEPRECATED, FIND ALTERNATE SOLUTION
Expand Down
2 changes: 1 addition & 1 deletion wled00/usermod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ if (samples_read > 0) {
digitalMic = true;
} else {
Serial.println("Digital microphone is NOT present.");
analogReadResolution(10); // Default is 12, which is less linear. We're also only using 10 bits as a result of our ESP8266 history.
// analogReadResolution(10); // Default is 12, which is less linear. We're also only using 10 bits as a result of our ESP8266 history.
}
}

Expand Down

0 comments on commit 36dfb5c

Please sign in to comment.