The led will work but if one of the Arduinos is off it will source current into the other D2. You can isolate with a diode from each D2 to the LED.
The led will work but if one of the Arduinos is off it will source current into the other D2. You can isolate with a diode from each D2 to the LED.