I am trying to implement a very simple door sensor (like the ones in this link https://medium.com/conectric-networks/playing-with-raspberry-pi-door-sensor-fun-ab89ad499964) which is monitored with a python script. I have found some examples for RPi but not for Jetson, so I have used a simple code using Jetson GPIO sampples(https://github.com/NVIDIA/jetson-gpio) and I have connected the door sensor to pins 16(output) and 18(input)
However it does not work as output is very unstable and it does not recognizes properly the output. I am using a Jupyter Notebook and the printouts in the input pin do not make sense.
Is there any simple example on how to connect and manage this?