-
Notifications
You must be signed in to change notification settings - Fork 639
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
PZEM004T compiling code problem #837
Comments
Thanks, Marius |
Yeah, just fixed the compiling problems, I have not test it yet. |
Hello, any news? Thanks |
I've been testing the PZEM with ESPurna and there an issue when using software serial that I have not been able to solve. Using hardware serial works just fine. I have changed the default method in the
|
Actually, using an oscilloscope shows that the PZEM is not answering back when using software serial... not sure the reason, but it does when using hardware serial.. |
@MariusLaurinaitis Can you give it a try using hardware serial? |
Hello, I tried it yesterday. But I do not understand. I have downloaded the DEV version. What do I need to change in specific files? At PZEM I connect the Wemos mini. |
arduino.h sensors.h #ifndef PZEM004T_SUPPORT #ifndef PZEM004T_USE_SOFT #ifndef PZEM004T_RX_PIN #ifndef PZEM004T_TX_PIN #ifndef PZEM004T_HW_PORT |
I understand that I can specify the Wemos PIN: // PZEM004T |
No, it should be like this:
And connect the PZEM to the RX/TX pins. |
OK, #define PZEM004T_HW_PORT Serial1 ? (delete 1?) And Wemos PIN RX and TX? Do I need to use the standard Wemos RX TX? |
The main hardware port in the ESP8266 uses GPIOs 1 and 3. These are mapped to RX and TX in the Wemos. So yes, you have to wire the PZEM004T to RX/TX and use the configuration I copied above. In your screenshot you can see it is still using SoftwareSerial (it says "PZEM004T @ SwSerial(13,15)") |
OK! All good! |
Nice, I'm labeling it as ready to deploy |
Hey, what's the final configuration? |
Is there a chance to get a pre build image for the pzem004t and a wemos d1 mini or the node mcu? Also wiring would be interesting... 😃 |
hey, goodafternoon, I need help, Can you help me? |
@jen101121 update ESP8266 Core in boards manager, it must be 3.1.2 If you still have any issues, please create a new one instead of continuing here |
Ohh, I see, I try later, Thank you. I'll update you if it is working.
…On Sun, Mar 17, 2024, 1:09 AM Max Prokhorov, ***@***.***> wrote:
@jen101121 <https://github.com/jen101121> update ESP8266 Core in boards
manager, it must be 3.1.2
don't see any problems when using arduino-ide 2.x or arduino-cli
If you still have any issues, *create* a new one instead of continuing
here
—
Reply to this email directly, view it on GitHub
<#837 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BHALZ23PWVJVKFHFXSXCCQTYYR4E7AVCNFSM4E6AGSPKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMBQGIYDKMBSHA2Q>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hello,
I have problem with PZEM004T, Platformio dont compile the code, I get an errors:
espurna/config/../sensors/PZEM004TSensor.h:131:23: error: expected identifier before numeric constant
espurna/config/../sensors/PZEM004TSensor.h:131:23: error: expected ',' or '...' before numeric constant
espurna/config/../sensors/PZEM004TSensor.h:130:28: error: invalid initialization of non-const reference of type 'Stream&' from an rvalue of type 'int'
espurna/config/../sensors/PZEM004TSensor.h:23:41: error: class 'PZEM004TSensor' does not have any field named '_data'
espurna/config/../sensors/PZEM004TSensor.h:75:25: error: no match for 'operator==' (operand types are 'Stream' and 'int')
espurna/config/../sensors/PZEM004TSensor.h:76:23: error: cannot convert 'PZEM004T' to 'PZEM004T*' in assignment
espurna/config/../sensors/PZEM004TSensor.h:78:41: error: no matching function for call to 'PZEM004T::PZEM004T(Stream&)'
espurna/config/../sensors/PZEM004TSensor.h:80:34: error: no matching function for call to 'PZEM004T::setAddress()'
espurna/config/../sensors/PZEM004TSensor.h:101:23: error: '((PZEM004TSensor*)this)->PZEM004TSensor::_ip' does not have cla
ss type
espurna/config/../sensors/PZEM004TSensor.h:115:54: error: no matching function for call to 'PZEM004T::current()'
espurna/config/../sensors/PZEM004TSensor.h:116:54: error: no matching function for call to 'PZEM004T::voltage()'
espurna/config/../sensors/PZEM004TSensor.h:117:52: error: no matching function for call to 'PZEM004T::power()'
espurna/config/../sensors/PZEM004TSensor.h:118:53: error: no matching function for call to 'PZEM004T::energy()'
The text was updated successfully, but these errors were encountered: