I’m having issues where i’m getting a gpio.LOW when it should be gpio.HIGH and vise-versa.
I have a magnet sensor connected from pin 22 to pin 24 and is set pin 22 as output and pin 24 as input. I write a gpio.HIGH on pin 24 and if the magnet sensor is connected I then later can read a gpio.HIGH on pin 22. This works for a while but then something goes wrong i’m getting gpio.HIGH even if the magnet sensor is not connected. Any ideas? I tried doing it with a pull up-resistor but couldn’t get it to work so that’s why i chose this route.
are you able to enter the location of the GPIOs, /sys/class/gpio and control the GPIO via sysnode?
for example,
enter the path as using # echo 417 > export to generate gpio417 name, then you’ll be able to enter /sys/class/gpio/gpio417/ for controlling the pin.
please have a try, thanks