Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By White Tiger
#92977 I am trying to continuously record at least 8kHz audio using NodeMCU v3 ESP8266 and MAX9814 microphone and send audio data to server via WiFi.

Reading with analogRead() inside loop is not consistent and sending data to server is slower than 125us (time between reading audio) so this solution does not work.
Using interrupt timer with flag does not solve problem,
Reading audio data inside ICACHE_RAM_ATTR function does not seem like a good solution.
It seems possible to setup, that ADC would directly write to two registers and when one is full you read and send data using CPU. However, not much documentation seems to exist.
Seems like I2S is used in similar situation, but I do not understand how to configure it.

Can someone help to configure such setup, if it is possible to do with ESP8266? At least some documentation suggestions would be appreciated too!