Open door sensor using GPIO


The Jetson GPIO ignores the “pull and down” instructions for GPIO.IN.
Consequently we cannot use a classic magnetic switch or limit switch.

Any suggestions on how to check if a door is open or closed?

I know it sounds like a silly question, but I can’t think of any efficient solution.

hello deusdixital,

am I understand correctly that you meant that Nano cannot recognize that high/low signal?
may I also know which pin you’re using, thanks

Hello Jerry,
There’s no way to control pull-up/-down on Jetson.
pull_up_down value is unused · Issue #5 · NVIDIA/jetson-gpio · GitHub

For example, connecting a switch between a GND pin and “pin 19 BOARD” I can’t see the state of the switch (open or closed).

import Jetson.GPIO as AGPIO

AGPIO.setup(19, AGPIO.IN, pull_up_down = AGPIO.PUD_UP)
def sensor():
    if AGPIO.input(19): #TD
        print("TD OPEN!")
        print("TD CLOSED!")


If you run that code. Jetson responds that it will not use the “pull up down” parameters.

As far as I know jetson nano has no internal resistors on gpio so you should use external one for gpio pull up

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.