I suspect that you need to connect the ground pins of both pi's together.