Skip to content

Analog Mic not working on ESP32, works with AnalogRead, though. #10

@Funkelfetisch

Description

@Funkelfetisch

What happened?

I tried a simple sketch in the Arduino IDE:

Serial.println(analogRead(35));

which does output seeminly correct (though super noisy) values. If I blow into the microphone I can clearly see it.

Now, if I try to use this fork, the I2S ADC stuff doesn't seem to work. and is always at max. I cannot figure out why.

(micReal always stays at 512
VolumeSmth goes to 0 at some random point in time,
DC_Level counts up to 512 and stays there. )

I added the "using audio input" line to make sure, but ADC1_CH7 seems correct.

How do I debug this?

To Reproduce Bug

use my custom PCB :/

Expected Behavior

work

Install Method

Self-Compiled or other

What version/release of MM WLED?

WLEDMM_0.14.0.10 esp32_4MB_max, build 2212060

Which microcontroller/board are you seeing the problem on?

ESP32

Relevant log/trace output

---WLED 0.14.0.10 2212060 INIT---
 WLEDMM_0.14.0.10 esp32_4MB_max, build 2212060.

Usermods setup ...
Finding temperature pin...
temperature usermod initialized.
Starting display.
AR: Analog Microphone (left channel only).
AR: Using audio input: 7
AR: sound input driver initialized successfully.FFT started on core: 
0
MPU6050 connection failed
mpu6050: DMP Initialization failed (code 1)
Ada

GPIO    | Assigned to           | Info
--------|-----------------------|------------
i/o   0   Button                  
i/o   1   ./.                     Serial TX
i/o   2   ./.                     
i/o   3   ./.                     Serial RX
i/o   4   ./.                     
i/o   5   ./.                     
i/o  12   ./.                     
i/o  13   ./.                     
i/o  14   ./.                     
i/o  15   usermod (UM)            
i/o  16   ./.                     (default) LED pin
i/o  17   ./.                     
i/o  18   Temperature (UM)        (default) SPI SLK  / SCK
i/o  19   ./.                     (default) SPI POCI / MISO
i/o  20   ./.                     
i/o  21   I2C (hw)                (default) I2C SDA
i/o  22   I2C (hw)                (default) I2C SCL
i/o  23   ./.                     (default) SPI PICO / MOSI
i/o  25   ./.                     
i/o  26   LEDs (digital)          
i/o  27   ./.                     
i/o  32   ./.                     
i/o  33   ./.                     
in   34   ./.                     
in   35   AudioReactive (UM)      
in   36   ./.                     
in   37   ./.                     
in   38   ./.                     
in   39   ./.                     
WLED initialization done.

Ada
No WiFi connection configured.
Opening access point WLED-AP
micReal:512.00  volumeSmth:8.54 DC_Level:0.04
micReal:512.00  volumeSmth:169.26       DC_Level:0.92
micReal:512.00  volumeSmth:250.26       DC_Level:2.00
micReal:512.00  volumeSmth:254.55       DC_Level:3.12
micReal:512.00  volumeSmth:254.94       DC_Level:4.11
micReal:512.00  volumeSmth:255.00       DC_Level:5.26
micReal:512.00  volumeSmth:255.00       DC_Level:6.38
micReal:512.00  volumeSmth:255.00       DC_Level:7.49
micReal:512.00  volumeSmth:255.00       DC_Level:8.55
micReal:512.00  volumeSmth:255.00       DC_Level:9.66
micReal:512.00  volumeSmth:255.00       DC_Level:10.72
...
micReal:512.00  volumeSmth:53.67        DC_Level:501.92
micReal:512.00  volumeSmth:53.59        DC_Level:501.94
micReal:512.00  volumeSmth:53.52        DC_Level:501.96
micReal:512.00  volumeSmth:53.44        DC_Level:501.98
micReal:512.00  volumeSmth:52.71        DC_Level:502.00
micReal:512.00  volumeSmth:34.41        DC_Level:502.03
micReal:512.00  volumeSmth:16.12        DC_Level:502.05
micReal:512.00  volumeSmth:0.00 DC_Level:502.07
micReal:512.00  volumeSmth:0.00 DC_Level:502.09
micReal:512.00  volumeSmth:0.00 DC_Level:502.11
micReal:512.00  volumeSmth:0.00 DC_Level:502.14
micReal:512.00  volumeSmth:0.00 DC_Level:502.16
micReal:512.00  volumeSmth:0.00 DC_Level:502.18
micReal:512.00  volumeSmth:0.00 DC_Level:502.20

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfxed in mdevfixed in latest mdev source code

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions