state of any GPIO pin remains HIGH even after disconnecting the logic input. I need to connect it to the ground to make it LOW again. Do I need to connect an external pulldown resistor, or can I use internal pulldowns such as raspberry pi?
External pull-down is necessary.
This is also not working. I used a 1k resistor as pulldown. State of the pin remains high.
Are you setting the GPIO as input or output? External resistor is for input.
external pullup or puldown? I m setting the GPIO as input in python code.
hello saurabh.rahatekar,
could you please share the pyhon code of your GPIO pin configuration for reference,
thanks
I m follwing this GitHub - NVIDIA/jetson-gpio: A Python library that enables the use of Jetson's GPIOs
And this is my code:
//#import RPi.GPIO as GPIO
import Jetson.GPIO as GPIO
import time
input_pin = 11
GPIO.cleanup()
GPIO.setmode(GPIO.BOARD)
GPIO.setup(input_pin, GPIO.IN)
GPIO.add_event_detect(input_pin, GPIO.RISING, bouncetime=2)
while True:
if( GPIO.event_detected(input_pin)):
counter+=1
print(counter+=1)
time.sleep(0.1)
hello saurabh.rahatekar,
it seems a bug in your printing function, you may check the value of counter instead of having +1 to the variable.