-
Notifications
You must be signed in to change notification settings - Fork 114
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
Ability to specify serial port request. #1
Comments
By default, hardware serial port is used only if you specify it's pins (0 and 1). |
I heard we can connect multiple devices on the same Serial pin's and use the IP address to differentiate the device. How true is this ? thanks |
Thank you for your reply, I must not been doing something right then. I had Sorry for my ignorance, but thank you again!
|
You can connect RX pins of multiple PZEM004s to one RX of your Arduino. But TX outputs of TTL serial devices are driven high when not sending data, so they cannot simply be wired together. You will need a multiplexer to read responses. |
That is inconvenient, seems strange that they are designed to be addressed but they simply can't be put on a common bus. Rather than adding a mutliplexer, perhaps they individual devices can be grounded to a dedicated DO that will only activate when there is an need for a read/write? |
I guess they designed it to support Ethernet on some other PZEMxxx devices. |
I never saw any PZEM devices with Ethernet port and the energy measurement IC in the device doesn't have any SPI pin's. DO : @inthebatcave says that we need to powerOn one device at a time and read it and switch it off and that using Digital Out pin. http://www.atlas-scientific.com/product_pages/components/port_connector.html The multiplexer does the samething, enable/disable a port using 2 digital output pins (S0, S1). |
added ability to use different Hardware Serial ports. See examples |
Thank you for this contribution. I just joined today, because of this. I have almost no idea what I'm doing, and I have more ideas than I have ability. I'm hoping to piece together a home automation / energy logger and getting my arduino mega to talk to my PZEM004 was my first piece. By pure dumb luck I was able to modify the library file to read from port1, but my end goal is to read from several at once, and I'm not sure where to begin.
The text was updated successfully, but these errors were encountered: