wiring input pin with input_pullup pin?

if i wire a input pin to a input pullup pin and read the input of the input pullup pin,
what will happen?
i heard that input pins will not work the same as ground so im just curious

HI,
With pullup turn on, on the input pin, if you digitalRead that pin without a switch attached, it will read HIGH, this is because the internal pullup resistors pull the pin HIGH.

If you fit a normally open switch from that input pin to GND, the digitalRead will return HIGH until you close the switch
It will then read LOW because the switch pulls the pin to gnd.

The internal pullup resistor is so high in value that connecting the pin to gnd will not damage anything.

This ensures that the input pin is either HIGH or LOW, never open circuit which will cause erratic input readings.

Tom.... :slight_smile:

yes i know that but what if the input pullup pin is wired to a input pin without a switch?
what would happen?

Hi

yes i know that but what if the input pullup pin is wired to a input pin without a switch?
what would happen?

You declare an input pin to have or have not a pullup resistor.
So if the pin is declared to have a pullup, but no switch, then reading it will give you a HIGH because the pin is PULLED HIGH.

With pullup turn on, on the input pin, if you digitalRead that pin without a switch attached, it will read HIGH, this is because the internal pullup resistors pull the pin HIGH

Unless you mean it somehow differently?

Tom... :slight_smile:
Are you talking about two input pins?

The pin with INPUT_PULLUP enabled will be HIGH and will pull the pin it is connected to HIGH as well. What else are you worried might happen ?

thanks for the replies!
i was worried that the input_pullup would read low
im a noob so i have no knowledge about these things
just trying to learn :slight_smile:

i was worried that the input_pullup would read low

The clue is in the name INPUT_PULLUP