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.
could you please share the pyhon code of your GPIO pin configuration for reference,
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
input_pin = 11
GPIO.add_event_detect(input_pin, GPIO.RISING, bouncetime=2)
it seems a bug in your printing function, you may check the value of counter instead of having +1 to the variable.