I’m afraid you’re totally wrong there. That circuit isn’t suitable for the ESP8266, only for something with an analogue input that works over the range 0 - 5 V. From the ESP8266 data sheet:
“The input voltage range is 0 to 1.0 V when TOUT is connected to external
circuit.”
Therefore, you need to set the midpoint voltage to 0.5 V, and you need to change the value of the burden resistor from 33 Ω to a value that gives you about 0.33 V rms (that’s about 1 V peak - peak) at the maximum current you want to measure.
I also have big reservations about the sketch.
Firstly, you need to mark up the code with three backticks on the line before and after. I’ve done that for you.
Secondly, because you’ve used the wrong assumptions, all your numbers are now wrong.
At maximum current (defined by your choice of burden resistor) you’ll have approx 0.5 V peak at the ADC input, so you need to recalculate based on that.
But what’s worse, there’s generally no relationship between the peak (or peak to peak) values of current and the rms value, because the current waveform is rarely a well-behaved sinusoid. Therefore your 0.707 will only apply then.
We get round that problem by properly calculating the rms (root mean square) value of the current directly from the measured values.
As far as I know, we don’t have a standard sketch for the ESP8266, but I think our standard library will work. So I suggest you start with this sketch:
The “111.1” in
emon1.current(1, 111.1);
depends on your c.t. and the value you choose for the burden resistor.
The number 1480 in
double Irms = emon1.calcIrms(1480);
is the number of sample to average over, and it should be a whole number of mains cycles for best accuracy. I have no idea (and it is not documented) what a suitable number would be for you. I would think start at a high number, and reduce it until the values start to become erratic, then go back a little way.