Can I connect the digital out of one arduino to a digital input of another? To detect a high/low state... One powered in one room on USB. The other in another room separate psu (connecting the grounds). I know I can use tx/rx serial. But if the other way would work, less programming and 1 wire less..
-
2Do you only need unidirectional (A -> B) or bidirectional comm. (A <-> B)? Also, with common ground it's always at least two wires (GND + Signal). Or you use a differential signaling (signalPLUS, signalMINUS), like RS-485 which allows for longer cables due to higher noise immunity. How long is the cable? – Maximilian Gerhardt Jun 2 '18 at 10:45
Yes, you can. As you noted, you do need to connect the grounds of both Arduinos.
For some extra protection you could put a resistor between the output and the input. For example a 1kOhm. That way, if you accidentally set both pins as outputs, or plug the wire in the incorrect pin, you won’t get a dead-short.
-
Thanks guys... Its just A>B so that's great. I will dig out a resistor – Puterpaul Jun 2 '18 at 17:42