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???
Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It only takes a minute to sign up.Sign up to join this community
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
1 (or constants like
GPIO.HIGH) which will make your code easier for you, and others, to read.