-->
Page 1 of 1

Constant ADC sampling, record audio with DMA

PostPosted: Thu Dec 02, 2021 5:04 pm
by White Tiger
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!

Re: Constant ADC sampling, record audio with DMA

PostPosted: Sun Jan 02, 2022 10:00 am
by eriksl
Use the search function on the board to find out why this won't work. It has been discussed many times.

Also use the arduino subsection for arduino questions.