Almost a year since the last post here. I think some of the problems reported here with the Arduino project for ESP8266 have been solved. I've been using code from the EmonLib library in NodeMCU boards from some time now without problems.
Recently I decided to put all that code in a proper library with some goals in mind:
Customizable ADC bit count
Customizable ADC voltage reference
Read ADC values via callbacks
The idea is to be able to use it with a bare ESP8266 chip (1.0V reference voltage) or any derived board (some have voltage dividers in place, so reference voltage for the ADC pin is 3.3V). Or use it with an external ADC chip or module, like the ADS1115 (16bits ADC). That's the main reason for the callback thing.
You can check out the library at bitbucket
https://bitbucket.org/xoseperez/emonliteesp and soon I'll be writing about a project using it in my blog here:
http://tinkerman.cat/your-laundry-is-done/.
Please, let me know what you think!