-
Notifications
You must be signed in to change notification settings - Fork 8
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
Compilation error #3
Comments
It seems that there are 2 errors in the softwareserial example:
I was able to compile the program (a simple getAddress) but was unable to change the address using setAddress; it always returned false. Now I will wire up the circuit and try to get some readings. Can you please look into why setAddress is not working. Thanks |
I'm initially using this code for ESP8266 on this project other boards were not tested, you can look into PZEM017v1.h and modify it there. setAddress problem is a known issue during the test, but my project doesn't require the address to be changed The project was finished last year I'm no longer have the hardware to fix the code 'pull request' is welcomed. |
Qmodbus looks interesting. I have downloaded it but cannot figure out how to change the slave id. Can you please help me out here? |
I was able to get the pzem-017 to work with QModBus. Apparently, you need a 120 ohm resistor between the A and B lines. I just added the resistor to the A/B terminal block and it started working. |
I am having some problem in reading through ESP32 USB RS485, I can read on PC. This means Pzem Module is fine. But on Arduino (ESP32) using Serial 2 (HardSerial Example), The Tx light on Rs485 Module blinks , but there is no response from Pzem. I also tried 100 Ohm and 180ohm resisters , I can found in my junk. I am not engineer, my guess is these resisters should work. B is connected to B & A is connected to A. Any help would be appreciated |
Change |
I am getting the following error when compiling for arduino nano:
....\Arduino\libraries\PZEM-017-v1-master\PZEM017v1.cpp: In constructor 'PZEM017v1::PZEM017v1(uint8_t, uint8_t, uint8_t)': ....\Arduino\libraries\PZEM-017-v1-master\PZEM017v1.cpp:90:32: error: 'SWSERIAL_8N2' was not declared in this scope port->begin(PZEM_BAUD_RATE,SWSERIAL_8N2); ^~~~~~~~~~~~ ....\Arduino\libraries\PZEM-017-v1-master\PZEM017v1.cpp:90:32: note: suggested alternative: 'SERIAL_8N2' port->begin(PZEM_BAUD_RATE,SWSERIAL_8N2); ^~~~~~~~~~~~ SERIAL_8N2 exit status 1
How can I make it compile?
Thanks
The text was updated successfully, but these errors were encountered: