When I initialise the GPIO by
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setup(24, GPIO.OUT, initial = GPIO.HIGH)
and I do gpio readall
in command line, I can see that value of pin 24 is 1.
But if I then try to change the value from Python using
GPIO.output(24, GPIO.LOW)
then it doesn't work.
Also if I connect LED to ground and then to 3V3 pin, it lights up, but when I connect it to ground and pin 24 when turned on, it doesn't. Where might be my problem?
gpio readall
might conflict withRPi.GPIO
- do the reading via python andRPi.GPIO
instead.