connection of 2 arduinos with digital pin

HI
Im am trying to pass a digital signal from 1 Arduino to another.
Arduino 1 sets pin D12 to HIGH/LOW. I can measure the voltage and it changes from 0.2 to 4.8 volts. I checked the connection to Arduino 2 and it has 0 ohm.
On Arduino 2 I use pinMode(8, INPUT), then digitalRead(8). I show the read state by using digitalWrite(13, HIGH/LOW).
Arduino 2 shows me always HIGH.
Do I need to add a pulldown resistor to pin D12 on Arduino 1 for this to work? 10 K should work? Or am I wrong with my setup?
Juerg

Hi,
Do you have the gnd of both arduino's connected together, they need to be so you can have the same reference for the signal.

Tom.... :slight_smile:
Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

A circuit is a loop - so you always need 2 or more wires joining two devices (unless one is an
antenna!)

So you have two things wrong. One is the failure to connect the grounds of the two systems together, the other is the failure to insert a 470 Ohm protective resistor in the line connecting the ports.

Paul__B:
...the other is the failure to insert a 470 Ohm protective resistor in the line connecting the ports.

+1
4k7 might be better/safer to limit pin fault current (phantom powering) to 1mA if/when one Arduino is off.
Leo..

Wawa:
4k7 might be better/safer to limit pin fault current (phantom powering) to 1mA if/when one Arduino is off.

Glitch from hurrying. That is what I meant.

Thanks for all your responses.
Main failure was that I saw the pin's voltage change when I did a digitalWrite but in fact the pin was never set into output mode with the pinMode command.
I forgot to tell you that the arduinos have a common ground in place.
Currently I have this in place:
Arduino 1: pinMode(12, OUTPUT), digitalWrite(12, 1/0)
Arduino 2: pinMode(8, INPUT_PULLUP), digitalRead(8)
The pins are connected by a wire without a resistor in the loop.
From what I read I should add a resistor? I see 2 recommendations, 470 Ohm or 4700 Ohm, as this differs 10 fold I am not really sure what to do.

4K7 is what Paul__B and Wawa agreed on. So do I.