From now on, sometimes I would like to publish results of internet searching… that I did NOT find. The results I wanted and I found after just after a long wandering.
import RPi.GPIO as GPIO GPIO.setmode(GPIO.GPM) GPIO.setup(25, GPIO.OUT) GPIO.output(25, HIGH)
Then, some times after, you are willing to know if pin 25 is HIGH o LOW. You have forgot it, or you are not you, but another person willing to know that. Problem: if you set pin 25 as input, you suddenly switch off it. So DO NOT DO this, in the same or another program:
GPIO.setup(25, GPIO.IN) print GPIO.input(25)
because you will always get a False, at least with default pullups.
Fortunately the answer is simple: just set that pin as output… but read it!
GPIO.setup(25, GPIO.OUT) print GPIO.input(25)
and you will get a True or a False depending on the real status.