Digital pins not going low

I know this is a really simple question, but I'm trying to use the code below to toggle a digital pin on and off on an Arduino UNO. I'm looking at the output using the Serial Plotter and Serial Monitor.

I have a potential divider of two equal resistors in series. Pin 7 is connected at the same point as the 5V V_in, A0 is connected to the midpoint of the two resistors, and the second resistor is connected to GND. My output is high all the time, and didn't change even when I disconnected literally everything from the board to check that I wasn't just measuring a baseline/ background value, and even when I comment out lines 11 and 12.

void setup() {
Serial.begin(9600);
pinMode(7, OUTPUT);
digitalWrite(7, LOW);
}

void loop() {
int pinOut = digitalRead(A0);
Serial.println(pinOut);

delay(100);
digitalWrite(7, HIGH);
delay(100);
digitalWrite(7, LOW);

}

I don't understand your circuit can you draw it please.

From the description:-

Pin 7 is connected at the same point as the 5V V_in,

It sounds like you are trying to short out the power supply, not a good thing.

"Pin 7 is connected at the same point as the 5V V_in"
Pin 7 can only sink 40mA, it can't pull the 5V pin or Vin pin low.
Disconnect it from that. It is declared as an Output, it will toggle if you haven't burned it out.
Does the 328 chip feel hot at all?

Thanks for your help, Grumpy_Mike and CrossRoads,

Although it's not hot at the moment, I strongly suspect that if my current incompetence didn't burn out the 328 chip with hindsight I probably fried it when I previously confused some over-long jump leads on my breadboard.

Thanks for your patience with a stupid question!

After you remove the short, try an LED (with the usual series resistor).

I have a potential divider of two equal resistors in series. Pin 7 is connected at the same point as the 5V V_in, A0 is connected to the midpoint of the two resistors, and the second resistor is connected to GND.

Also... You should have 2.5V on A0. That's not defined as high or low!

Anything above 3V will read high.
Anything below 1.5V will read low.

Anything in-between is undefined and is not guaranteed to read either way.

You can connect the output directly to the input without any resistors and it should read fine. But, it would be good practice to put a resistor in series (maybe 1K) in case you accidently write-out to the "input" pin, and write one pin high and the other low. However, in general this is a silly thing to do because your software always "knows" if you written high or low to an output pin.