Skip to content
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 WITH ARDUINO UNO #52

Open
saeednama opened this issue Dec 20, 2018 · 2 comments
Open

PZEM004T WITH ARDUINO UNO #52

saeednama opened this issue Dec 20, 2018 · 2 comments

Comments

@saeednama
Copy link

saeednama commented Dec 20, 2018

pzem004t wiring
pzem004t with arguing uno

I have tried the codes here with Arduino UNO, it gives only 0v output doesn't matter if I connect or disconnect the PZEM004T, is this problem from the PZEM or in the code?

@olehs
Copy link
Owner

olehs commented Dec 20, 2018

You cannot use pins 0 & 1 on UNO simultaneously with Serial output, because Serial uses these pins.
Try SoftSerial example with different pins (like default 10,11)

@geev8
Copy link

geev8 commented Mar 27, 2019

Hi am receiving this error msg when compiling my codes make on linux

/usr/share/arduino//libraries/PZEM004T/PZEM004T.cpp: In member function ‘bool PZEM004T::recieve(uint8_t, uint8_t*)’:
/usr/share/arduino//libraries/PZEM004T/PZEM004T.cpp:148:15: error: ‘yield’ was not declared in this scope
yield(); // do background netw tasks while blocked for IO (prevents ESP watchdog trigger)
^
/usr/share/arduino//libraries/PZEM004T/PZEM004T.cpp:162:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0; i<RESPONSE_DATA_SIZE; i++)
^
/usr/share/arduino/Arduino.mk:1186: recipe for target 'build-uno/libs/PZEM004T/PZEM004T.cpp.o' failed
make: *** [build-uno/libs/PZEM004T/PZEM004T.cpp.o] Error 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants