Removing 5V from a pin does not make it go to false. What you’re experiencing is probably an issue with your wiring. You need to add pull down resistors to force the pin down when there is no voltage applied.
For your Arduino to Arduino communication, there is nothing on OpenPLC that you can use for that. The easiest approach would be to connect both Arduinos to a master (runtime running on a Linux device for example).
Hello,
Thank you very much for your response—it was very helpful!
Regarding the input latency issue: Your suggestion about pull-down resistors was spot on. After testing, everything works correctly when configuring all inputs as %IX100.0->IX105.7, except for %IX103.6 and %IX103.7 (pins 20/SDA and 21/SCL). These two inputs remain active unless explicitly forced low with pull-down resistors. I’ve now added the resistors, and the issue is resolved.
Regarding Arduino-to-Arduino communication: I’m already using a Windows-based OpenPLC Runtime server to manage my setup. I’m a bit confused by your suggestion to use a Linux device as a master. Could you clarify:
- Do you mean using a Raspberry Pi (e.g., with Raspbian) connected to both Arduinos via USB, acting as the central OpenPLC Runtime host?
- If so, is there a specific procedure or documentation for configuring multiple USB-connected Arduinos under OpenPLC Runtime on Linux? For example, how to map inputs/outputs from two separate devices in the same project?
Any additional guidance or links to relevant resources would be greatly appreciated!
Thanks again for your help.
Best regards,
Pierre-Philippe Hardy