Emonlib.h not working with platformio esp32


I am doing a project with a current transformer , esp32 dev kit , visual studio code and platformio.
Library :emonlib.h

After I download my project to esp32, I turn on the serial monitor, the serial monitor works ok, but after that, if I try to download the sketch again and it shows an error that say that in cant connect to the board. The only way to solve the problem is to press the boot button on the esp32 board. This is the only project that I have this problem, with, all other download without pressing the reset button on the esp32.

It looks that the emonlib is causing some incompatibility with platform io. if I test the same project in the arduino ide it works perfect.

help would be much appreciated, thank you

Hello @albaboun, EmonLib is designed for the Atmel Atmega328 and has no intended support for the ESP32. I think there have been discussions on the forum about adapting EmonLib for the ESP8266 that you may be able to find, these may give pointers on how to adapt for the ESP32.

many thanks!!