Connecting to arduinos

Discussion in 'Embedded Systems and Microcontrollers' started by skusku, Oct 8, 2013.

  1. skusku

    Thread Starter Active Member

    Aug 9, 2009
    What will happen if I connect Arduino#1 as an output directly to Arduino#2 as an input?

    Or should I configure it as a button with a resistor for Arduino#2 as :
  2. sirch2

    Well-Known Member

    Jan 21, 2013
    In that "button" example the resistor is a pull-down to ensure that the pin is 0 (gnd) unless the button is pressed in which case it would go high. Nothing "serious" is going to happen if you connect the digital pins from one Arduino to another without pull-up/down resistors but the results may not be reliable because the pins may float if no specific value is assigned to them.

    The AVR processors have internal pull-up resistors and so you can use
    Code ( (Unknown Language)):
    2. pinMode(pin, INPUT);           // set pin to input
    3. digitalWrite(pin, HIGH);       // turn on pullup resistors
    to enable the interal pull-ups and you would not need the external resistor (assuming you could live with pull-up rather than pull-down as per teh "button" example