How verify if Relay are HIGH or LOW through code?

Hello, I'm newbie on Arduino, and I'm stuck on a project where I already spend a couple of days trying to find out how can I check constantly if relay are connected to his respective pin or he lost his connection to the PIN.
Sorry if this sounds stupid and for my bad English.

Here is my code:

#include <SoftwareSerial.h> // Incluimos a livraria SoftwareSerial
SoftwareSerial mySerial(8, 9); // Declaramos os pinos RX(8) y TX(9) que vamos a usar
#include <Wire.h>
#include <LCD.h>
#include <LiquidCrystal.h>
#include <LiquidCrystal_I2C.h>
#define I2C_ADDR 0x3F
LiquidCrystal_I2C lcd(0x3F, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);
int 0 = LOW;
int 1 = HIGH;
int Relay_1 = 10; // LED connected to digital pin 13
int val = 0; // variable to store the read value
int Reading;
void setup() {
pinMode(Relay_1, INPUT_PULLUP); // sets the digital pin 13 as output
// pinMode(inPin, INPUT); // sets the digital pin 7 as input
}

void loop() {
//digitalWrite(Relay_1, HIGH);
Reading = digitalRead(Relay_1); // Reading status of Arduino digital Pin

if(Reading == 1)
{
Serial.print(Reading);
lcd.setCursor(0,0); //First line
lcd.print("Relay Connected");
}

if(Reading == 0)
{
lcd.setCursor(0,0); //First line
lcd.print(" Relay Disconnected ");
}

}

Best regards!

I already spend a couple of days trying to find out how can I check constantly if relay are connected to his respective pin or he lost his connection to the PIN.

You can't tell if there is something connected to a pin, or not. Therefore, you should assure that such connections can not become separated.

  pinMode(Relay_1, INPUT_PULLUP);  // sets the digital pin 13 as output

That comment is complete and utter nonsense.

PaulS:
You can't tell if there is something connected to a pin, or not. Therefore, you should assure that such connections can not become separated.

Not true. There are many ways to detect if a connected circuit is operating properly or not. How do you think your car's BCM is able to detect when you have a headlight out?

The catch is that it requires extra hardware to sense the remote circuit. For a relay you might have a current sensor that measures if the correct amount of current is being supplied to the relay. If you turn the relay on but it's not drawing power, then it's obviously not working.

This obviously adds complexity to the project, so you need to do a cost/benefit analysis to determine if detecting proper operation of the relay is worth the extra complexity.

  pinMode(Relay_1, INPUT_PULLUP);  // sets the digital pin 13 as output

That comment is complete and utter nonsense.

Completely true.

How do you think your car's BCM is able to detect when you have a headlight out?

It can NOT tell the difference between the headlight burned out and the headlight is unplugged. In both cases, the headlight has stopped drawing current, which is what the device is detecting.

PaulS:
It can NOT tell the difference between the headlight burned out and the headlight is unplugged. In both cases, the headlight has stopped drawing current, which is what the device is detecting.

At last count there were 73 angels on the head of my pin.

...R

Robin2:
At last count there were 73 angels on the head of my pin.

...R

I'm missing something.

PaulS:
It can NOT tell the difference between the headlight burned out and the headlight is unplugged. In both cases, the headlight has stopped drawing current, which is what the device is detecting.

Does it need to? Either way the headlight isn't shining.

Jiggy-Ninja:
Does it need to? Either way the headlight isn't shining.

OP's requirement was to know whether there was a relay connected to the input pin. So, apparently, it does matter.

Your example of an output pin sinking current isn't really relevant.