-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ESP32 Support #20
Comments
I don't have anything to add as far as fixing the issues - but I can say I have duplicated the same basic effect. It works with Serial2, does not work with the EspSoftwareSerial library found here https://github.com/plerup/espsoftwareserial This might be tricky to debug - not sure exactly where to start, my board the TTGO ESP32 TFT with LCD screen had no available extra serial as the Serial2 port is used by the built in LCD screen. I switched to a different board with the hardware serial pins 16,17 available and it works with the hardware serial example. |
can you upload ready made example with esp32 & esp8266 in next release? |
+ example Closes mandulaj#20 Signed-off-by: Emil Muratov <gpm@hotplug.ru>
+ example Closes mandulaj#20 Signed-off-by: Emil Muratov <gpm@hotplug.ru>
+ example Closes mandulaj#20 Signed-off-by: Emil Muratov <gpm@hotplug.ru>
I am aware of the Software Serial bug in ESP32 and I don't have a solution. However I think that since the ESP32 has 3 HW serial ports which can be configured to use any GPIO pin, there isn't really any need for a Software Serial solution. If there is a requirement to use the Software Serial, I might consider looking into it in the future. But for now, I think its better to just not support it on the ESP32 platform. |
Yes, you no longer need to use SoftwareSerial on the ESP32, even to address multiple pzems thanks to the new updates 🎉 |
OK, The newest code has now been merged into master. Soon I will update the PlatformIO and Arduino Library manager library. Here is the the new way of defining HW Serial on ESP32s: // RX=16, TX=17
PZEM004Tv30 pzem(Serial2, 16, 17); If there isn't anything else, I will close this issue. |
i am having issues (esp32) i have tried some else code with ardunio |
@rohanpatil-rc You will have to give me more info in order to help you. Which pins are you using on the ESP32, can you share the code? Is the PZEM powered by AC? Could you share the code or library that does work? Are you sure you are using a PZEM 0004T version 3.0? |
i have delete my post with the code that is was having issues. |
Please add ESP32 support.
I changed line #25 in PZEM004Tv30.h file to:
#if (not defined(PZEM004_NO_SWSERIAL)) && (defined(__AVR__) || defined(ESP8266)) || defined(ESP32)
which makes it works with hardwareserial e.g. serial2
But softwareserial still makes problems and didn't work with the EspSoftwareSerial.
The text was updated successfully, but these errors were encountered: