-->
Page 5 of 6

Re: Integrate EmonLib (energy monitor) library to ESP

PostPosted: Wed Jul 15, 2015 11:36 am
by juanpintom
Thank you for sharing!

Regards!

Re: Integrate EmonLib (energy monitor) library to ESP

PostPosted: Mon Jul 27, 2015 3:20 am
by TylerDurden
juanpintom wrote:Yes, probably you're right, but for now am working with the Attiny why the code of Emonlib must be modified too and I've no time, but is planned :) If you get it emolib working on ESP and ADC PIN please share your results :)

Regards!


I've tried it - works fine. The only change that was necessary, was the one documented in this thread.

Re: Integrate EmonLib (energy monitor) library to ESP

PostPosted: Mon Jul 27, 2015 9:06 am
by juanpintom
Ok, i'll do some test on two weeks (on my holydays). Then we only need to change getVcc?

Regards

Re: Integrate EmonLib (energy monitor) library to ESP

PostPosted: Mon Jul 27, 2015 11:15 am
by TylerDurden
juanpintom wrote:Ok, i'll do some test on two weeks (on my holydays). Then we only need to change getVcc?

Regards


You have to provide a replacement for the sqrt function: #define sqrt(x) exp(log(x) / 2.f)
And just set the getVcc to 1V static - alternatively leave the function alone and simply calibrate against the lib with a watt meter.