PlatformIO Community

ESP32 WiFi MEMS Microphone

Can we make a wireless microphone? ESP32 Bluetooth Fail

Building this esp32_wireless_microphone project gives an error.
In the Application.cpp file, the include FreeRTOS.h command stops giving an error only after changing it to include freertos/FreeRTOS.h, but it still project doesn’t work.
Lib “ESP Async WebServer” (by Hristo Gochkov) (v.1.2.3) - 76.898 Bytes.
I saw this library in a larger size.
I tried it on Windows and Mac - the result is the same.

I get the following errors when compiling. Please tell me how to eliminate them.

c:/users/ave/.platformio/packages/toolchain-xtensa-esp32/bin/…/lib/gcc/xtensa-esp32-elf/8.4.0/…/…/…/…/xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32dev\lib1ba\libESP Async WebServer.a(AsyncWebSocket.cpp.o):(.literal._ZN22AsyncWebSocketResponseC2ERK6StringP14AsyncWebSocket+0x10): undefined reference to SHA1Init' c:/users/ave/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32dev\lib1ba\libESP Async WebServer.a(AsyncWebSocket.cpp.o):(.literal._ZN22AsyncWebSocketResponseC2ERK6StringP14AsyncWebSocket+0x18): undefined reference to SHA1Update’
c:/users/ave/.platformio/packages/toolchain-xtensa-esp32/bin/…/lib/gcc/xtensa-esp32-elf/8.4.0/…/…/…/…/xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32dev\lib1ba\libESP Async WebServer.a(AsyncWebSocket.cpp.o):(.literal._ZN22AsyncWebSocketResponseC2ERK6StringP14AsyncWebSocket+0x1c): undefined reference to SHA1Final' c:/users/ave/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32dev\lib1ba\libESP Async WebServer.a(AsyncWebSocket.cpp.o): in function AsyncWebSocketResponse::AsyncWebSocketResponse(String const&, AsyncWebSocket*)’:
D:\Work\PlatformIO\wireless_microphone/.pio/libdeps/esp32dev/ESP Async WebServer/src/AsyncWebSocket.cpp:1269: undefined reference to SHA1Init' c:/users/ave/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: D:\Work\PlatformIO\wireless_microphone/.pio/libdeps/esp32dev/ESP Async WebServer/src/AsyncWebSocket.cpp:1270: undefined reference to SHA1Update’
c:/users/ave/.platformio/packages/toolchain-xtensa-esp32/bin/…/lib/gcc/xtensa-esp32-elf/8.4.0/…/…/…/…/xtensa-esp32-elf/bin/ld.exe: D:\Work\PlatformIO\wireless_microphone/.pio/libdeps/esp32dev/ESP Async WebServer/src/AsyncWebSocket.cpp:1271: undefined reference to SHA1Final' c:/users/ave/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32dev\lib1ba\libESP Async WebServer.a(WebAuthentication.cpp.o):(.literal._ZL6getMD5PhtPc+0x4): undefined reference to mbedtls_md5_starts’
c:/users/ave/.platformio/packages/toolchain-xtensa-esp32/bin/…/lib/gcc/xtensa-esp32-elf/8.4.0/…/…/…/…/xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32dev\lib1ba\libESP Async WebServer.a(WebAuthentication.cpp.o): in function getMD5(unsigned char*, unsigned short, char*)': D:\Work\PlatformIO\wireless_microphone/.pio/libdeps/esp32dev/ESP Async WebServer/src/WebAuthentication.cpp:73: undefined reference to mbedtls_md5_starts’

See Solved "AsyncElegantOTA >> collect2.exe: error: ld returned 1 exit status"

(post deleted by author)

I selected the required library and the project works.

Add in platform. ini
lib_deps = https://github.com/me-no-dev/ESPAsyncWebServer.git
or in folder project lib ESPAsyncWebServer.zip

Change src/Application.cpp Change
#include <FreeRTOS.h> => #include <freertos/FreeRTOS.h>

PLATFORM: Espressif 32 (4.1.0) > Espressif ESP32 Dev Module

PACKAGES:

  • framework-arduinoespressif32 @ 3.20001.0 (2.0.1)
  • tool-esptoolpy @ 1.30100.210531 (3.1.0)
  • toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch3

Dependency Graph
|-- audio_input
|-- ESPmDNS @ 2.0.0
| |-- WiFi @ 2.0.0
|-- WiFi @ 2.0.0
|-- ESPAsyncWebServer
| |-- FS @ 2.0.0
| |-- AsyncTCP @ 1.1.1
| |-- WiFi @ 2.0.0
|-- SPIFFS @ 2.0.0
| |-- FS @ 2.0.0

PIN MEMS INMP441
GND - L/R | | GND - GND
GP22 - WS | | VDD - +3.3V
GP26 - SCK | | SD - GP21