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

User avatar
By John Heath
#36021 Hi guys,

I have a custom PCB using an ESP8266-12E to do AP+Station, Config page, NIST, REST, DST, etc. Works great.

Problem is I need to sample at 8KHz and the analogRead() function won't go above 2.5KHz.

pvvx's Web Master has read_adcs(), which samples at 20KHz.

1) How do you get it to compile / work in Arduino?

2) If you run it in Arduino in loop(), how fast does it run?
User avatar
By martinayotte
#36025 Do you means https://github.com/pvvx/esp8266web ?
From what I see in the code, in driver/adc.c, he is using an external I2C ADC, not the ADC from ESP which is only 10 bits and, in fact as you mentioned, limited in sampling rate.
From this code, it is not clear which ADC he is using.
Maybe you should send him a PM.
User avatar
By John Heath
#36026
martinayotte wrote:From what I see in the code, in driver/adc.c, he is using an external I2C ADC, not the ADC from ESP which is only 10 bits and, in fact as you mentioned, limited in sampling rate.


Thank you for your reply. I've learned a lot from your forum posts.

I'm going to contact him and ask whether the ADC is external or on board the ESP.