digitalRead() for testing connections

So, i've "soldered" with a hot knife a wire i've ripped from a stepper motor, and wanted to know if the connection was fine. in theory i could connect one end to a digital pin and the other to another, digitalwrite though the first pin and digitalRead trough the second one right?

im not sure, ive tried to test it, with a led, but it wouldnt even light up, shouldnt the input pin be soakin up the energy as the GND pins would? if not, what's the difference on a pushbutton going to an input and a led being connected to it?

Im sure this is probably an stupid misconception of mine.

I was also thinking i could use the stepper without a microcontroller, shifting the pinmode from input to output to switch the current as the controller would, is that possible?

Thanks for dealing with my incompetence, im new to this, but i want to know why is this failing

You should be careful when you connect pins to each other. Use a current limiting resistor. 250 ohm or more. Without it you more or less have a short circuit that can destroy both pins.

Are you trying to run your stepper motor directly from Arduinos I/O-pins, it better be a very tiny motor. Same reason as above. You can only pull 20-30 milliamps without risking to overload the pins.

in theory i could connect one end to a digital pin and the other to another, digitalwrite though the first pin and digitalRead trough the second one right?

If you set the pin modes correctly, AND used pullup or pulldown resistors, in addition to the wires, yes.

im not sure, ive tried to test it

If you are not sure that you've tried to test it, how can we be sure?

with a led

An LED is not a wire.

shouldnt the input pin be soakin up the energy as the GND pins would?

If configured properly, if you haven't burned it out, and if the current is reasonable, yes.

if not, what's the difference on a pushbutton going to an input and a led being connected to it?

A pushbutton completes, or does not complete, a circuit. An LED does not. An LED will light up when current flows, and not be harmed. A pushbutton will not.

I was also thinking i could use the stepper without a microcontroller

Really?

shifting the pinmode from input to output

Without a microcontroller, how can you do that?

to switch the current as the controller would, is that possible?

Yes. With the proper external circuitry. An Arduino can NOT provide enough current to power a stepper motor.

Thanks for dealing with my incompetence

No problem. Thanks for the laughs.

but i want to know why is this failing

We can't see what you are doing, or your code, so we can't help.

"If you set the pin modes correctly, AND used pullup or pulldown resistors, in addition to the wires, yes."

So i would have to first set it as an output so i can digitalwrite(x,LOW) and then set it as an input so i can digitalread? and add resistors at both ends of the led?

"A pushbutton completes, or does not complete, a circuit. An LED does not. An LED will light up when current flows, and not be harmed. A pushbutton will not."

i didnt really get that, you're sayin a led dosnt complete a circuit?

"Without a microcontroller, how can you do that?"

idk, i tought of doing it with code, alternating witch one is the input and witch one its the output.

so about my led experiment it didnt work because i didnt use resistors? or did i set the pins wrong?

void setup() { pinMode(50, OUTPUT); // im using this as positive pinMode(53, INPUT); // input works as negative right? }

void loop() { digitalWrite(50,HIGH); digitalWrite(53,LOW); // idk if i can do this to an input Serial.print(digitalRead(53)); delay (500); }

Buy yourself a cheap multimeter or take the bulb and battery out of a torch and test the continuity of the wire with that.