Closed pieman64 closed 7 years ago
You could try using this library or just revert to previous version. This commit allows to use multiple PZEMs at once with one Arduino. Default Arduino's SoftwareSerial supports multiple instances and I don't know why ESP's one doesn't,
BTW, looks like library I specified in my previous comment is just the default library of ESP for Arduino. Maybe you just need to update your ESP8266 libraries?
@olehs I will check through your comments. Do you not use the PZEM with an ESP?
No, I use it with Arduino Mega and Ethernet shield. I actually prefer wired solutions )
I thought as much because I don't think I have any outdated core libraries. Could you perhaps modify the commit just to cover Arduino board types?
@pieman64 I do not see this error. I was able to build with the last commit and EspSoftwareSerial under platformio and under Arduino IDE with espressif SDK 2.0 @olehs It would be great to add library.json to your project, so it could be easily tracked.
@vortigont Did you install EspSoftwareSerial manually or it was installed as a part of ESP SDK (using board manager)?
@olehs I used version from git Just checked, indeed arduino bundled version for ESP8266 platform throws compile error.
The author of ESP8266 SDK agreed to update his library https://github.com/esp8266/Arduino/issues/3239
Thank you! I have got the same compile error with ESP8266, and this helped me a lot!
P.S. @olehs I deleted my misplaced issue
@olehs I'm using the master branch of the Arduino core for ESP and I can confirm all is now fine.
@olehs the commit you made on the 30th of April for PZEM004.cpp of:
line 136 if(_isSoft) line 137 ((SoftwareSerial *)serial)->listen();
stops compilation of your library on ESP's.
What does the commit do and can we simply revert back to the earlier cpp?
The compiler error for ESP's with the 2 lines included is: