Connecting to arduinos

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

  1. skusku

    Thread Starter Active Member

    Aug 9, 2009
    63
    1
    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 :
    http://arduino.cc/en/tutorial/button
     
  2. sirch2

    Well-Known Member

    Jan 21, 2013
    1,008
    351
    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)):
    1.  
    2. pinMode(pin, INPUT);           // set pin to input
    3. digitalWrite(pin, HIGH);       // turn on pullup resistors
    4.  
    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
     
Loading...