I am trying to use a pin to both input and output a signal. I want it to loop between checking for a closed-loop and outputting a voltage to an LED. I plan to do this using a transistor. However, whenever the pin is in input_pullup mode, its output voltage is over 5V and it is triggering the transistor making it impossible to distinguish between its input and output loop. In the output loop, the pin is either outputting 5V or 0V. In the 5V mode, it turns on the transistor and allows the 5V pin to light up the LED.
Digital INPUT means read.
Digital OUTPUT means write.
Digital OUTPUT may be HIGH or LOW. VCC or GND. Beware to not wire so that too much current is sourced or sank.
" However, whenever the pin is in input_pullup mode, its output voltage is over 5V and it is triggering the transistor making it impossible to distinguish between its input and output loop."
INPUT_PULLUP pins get VCC through 20K to 50K impedance. If you read over 5V, you must be supplying over 5V.
Get the datasheet for your MCU (Uno uses ATmega328) and see if you can find any current loop digital IO function. Along the way you might learn how they really work.
Not possible with out some complicated external hardware. The Arduino has more then one input and output pin.
Use 1 for goes in to and the other for goes out of. Get the Arduino cookbook and read it. Also on line there are many videos etc showing the Arduino and how to do what you want. This additional information will go a long way in getting your problem solved. Once you get past this you then need to select your sensors and actuators. At that point you start on the hardware design and write your software.