Issue with a SIngle 5V Relay

Hello Everyone,
I have connected a simple relay module to my Nano board. The connections are as below:-
VCC → 5 volt pin
GND → Ground pin
IN → GPIO 21
As soon as I make the connections, the relay goes HIGH (switched ON).
I am running the following code but it makes no difference.
But when I make the same connections on raspberry Pi, the relay is NOT HIGH (not Turned ON) and the code works perfectly fine.
I want a working code for switching relay ON for my Jetson Nano. Can somebody please help?
CODE:
import RPi.GPIO as GPIO
import time
channel = 21

GPIO setup

GPIO.setmode(GPIO.BCM)
GPIO.setup(channel, GPIO.OUT)
def motor_on(pin):
GPIO.output(pin, GPIO.HIGH) # Turn motor on
def motor_off(pin):
GPIO.output(pin, GPIO.LOW) # Turn motor off
if name == ‘main’:
try:
motor_on(channel)
time.sleep(1)
motor_off(channel)
time.sleep(1)
GPIO.cleanup()
except KeyboardInterrupt:
GPIO.cleanup()

GPIO ch 21,

would you let me know pin number on the connector ?

Hello,
I connected the “In” GPIO pin with 18 number board pin first then with 40 number board pin and even tried to change the channel to 18 rather than channel = 21. Both did not work for me. THe relay is already high, when i still run the code, the Green LED brightens a lot more than before.

IF you use Jetson Nano DevKit to test,
refer this to find out proper GPIO#.

Hello,
I checked the pinouts. I am using Jetson Nano DevKit to test. Can you please tell me in which GPIO shall i use the “IN” GPIO and what will be the channel if i am using RPi.GPIO please? :)

Hello everyone,
Which GPIO is not already high on Nano DevKit can someone help me with that please?

You can use ANY gpio, sysfs gpio number with physical pin number.
How about use gpio79?