cable connection between 2 Arduino long distance

Try RS485;

https://arduino-info.wikispaces.com/SoftwareSerialRS485Example