If I do not specify the output of GPIO pin (like GPIO.output(4, False)), I always have a voltage of 1.3V on this pin

How can I set all pins to 0v? and why are undefined pins have this voltage of 1.3v???

2 Answers 2


The default state of pins is given in http://www.panu.it/raspberry/

The default Device Tree settings configure most pins as inputs, some with pullup others with pulldown.

Pins set as input cannot be said to "have a voltage", except for the high value pullup resistors they are in a high impedance state. Any voltage you measure is a artefact, and depends as much on the measurement circuit as the state of the pin.

If you want to change the pullup on a input pin you would do something like GPIO.setup(4, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)

Incidentally DO NOT use constructs like GPIO.output(4, False) - You are NOT setting the pin to False, use 0 or 1 (or constants like GPIO.HIGH) which will make your code easier for you, and others, to read.


With the pin defaulting to be an input, and with no pullup/pulldown defined you are just looking at the (relatively undefined) high-impedence voltage of the input pin.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.