olehs / PZEM004T

Arduino communication library for Peacefair PZEM-004T Energy monitor
MIT License
225 stars 114 forks source link

use mega hardware serial #7

Closed th4904 closed 7 years ago

th4904 commented 7 years ago

I want use arduino mega and two pzem sensors. but two software serial is not work well. how to use mega`s hardware serial?

olehs commented 7 years ago

You're right. We need to add some flexibility to support combinations of software/hardware ports on different controllers. I'll see what I can do.

olehs commented 7 years ago

Added ability to use different Hardware Serial ports. See examples

th4904 commented 7 years ago

thanks to update. but hardware serial example is not run. plz check your lib

olehs commented 7 years ago

What controller do you use?

th4904 commented 7 years ago

use arduino mega 2560 ,like this image

th4904 commented 7 years ago

thank!! new lib is work!!