Connecting microcontrollers via GPIO
As mention in the comment a schematic would help. Besides that: As soon as I read 'Arduino' and 'Pi' in the same question all my hair starts standing up because they use different I/O voltages. The Pis are 3.3 Volts the Arduinos are 5Volt. I am most surprised that your Pi did not blow up.In general it does not hurt to connect controllers using resistors. The input impedance of a controller is very high thus adding a 2.2K resistor will not matter during operation. But it does protect your controllers if you have two outputs connected.Coming back to the voltage difference: You can safely connect an output from the Pi to an input on your Arduino but as mention, adding a series resistor is a safety precaution.The other way around you have to reduce the voltage. Simplest and cheapest is to use two resistor as voltage divider. You have to go from 5V to 3.3V which is a reduction of 0.66. I would recommend 1200 Ohm plus 2200 Ohm. 







simulate this circuit &ndash; Schematic created using CircuitLab