Crossing Arduino Esplora and Arduino Uno

Hello,

I've been experimenting recently on using the Esplora and Uno together, and I'm having a little trouble. I hooked up pin 14 on the Esplora to pin 3 on the Uno. I uploaded this code to the Esplora:

#include <Esplora.h>

int out = 14;

void setup() {

  pinMode(out, OUTPUT);
  
}

void loop() {

  Esplora.readButton(SWITCH_DOWN);
  if (SWITCH_DOWN == LOW) {

    digitalWrite(out, HIGH);
    
  }

  else {

    digitalWrite(out, LOW);
    
  }
}

And this code to the Uno:

int in = 3;

void setup() {

  pinMode(in, INPUT);

  pinMode(13, OUTPUT);
  
}

void loop() {

  digitalRead(in);

  if (in == HIGH) {

    digitalWrite(13, HIGH);
    
  }

else {

digitalWrite(13, LOW);

}

What I expected to happen was when I pressed the bottom button on the Esplora, the tiny LED on the Uno (pin 13) would turn on. Could someone explain why this didn't happen and how I could fix it? Both codes are uploaded to the correct boards. The Esplora is powered via usb, and the Uno is powered by a 9V battery. Attached is a diagram.

(deleted)

spycatcher2k:
digitalRead(in);

You read it but do nothing with it

int pinReading = digitalRead(in);
if (pinReading == HIGH)

Duhhh -

Code was corrected to

int input1 = 3;

void setup() {

  pinMode(in, INPUT);
  pinMode(13, OUTPUT);
  
}

void loop() {

  int button1 = digitalRead(input1);

  if (button1 == HIGH) {

    digitalWrite(13, HIGH);
    
  }

  else {

    digitalWrite(13, LOW);

  }
}

When devices run on power from multiple sources, they must share common GND. Otherwise, there is no common frame of reference, and signalling becomes meaningless.