Using EmonLib with esp32?


I am using esp32 DOIT dev kit to measure current sensor. i use Emonlib to read the current, but it deal with 10 bit ADC by default according to the library. to change the resolution of ADC you should put line of code in setup function analogReadResolution(ADC_BITS); no output is generated.
so what is the change in library to work with esp32?
is anyone try to measure current sensor by esp32?

I’m unable to source any information about this particular version. All the references I can find, to the ESP32 generally, indicate that what you have done should work; though there’s a suggestion that 12 bits might not work, and 11 bits might, i.e.

The obvious question is, does ADC_BITS have a value? And is it 12?

Why did you say that 12 bits may fail but 11 bits might work? Wasn’t it that if we have more bits, we will have more resolution?

That is what I read. I can’t remember where I saw it, not nearly 2 years later.