I can't run dc motors with jetson nano

Hello.I’m trying to run dc motors with import RPi.GPIO or import Jetson.GPIO .But both of doesnt work.Im getting same warnings(WARNING: Carrier board is not from a Jetson Developer Kit.
WARNNIG: Jetson.GPIO library has not been verified with this carrier board,
WARNING: and in fact is unlikely to work correctly. ) and dont run anything.Can you help me please? Thanks.
CODE:
import RPi.GPIO as GPIO
import time

for 1st Motor on ENA

ENA = 33
IN1 = 35
IN2 = 37

set pin numbers to the board’s

GPIO.setmode(GPIO.BOARD)

initialize EnA, In1 and In2

GPIO.setup(ENA, GPIO.OUT, initial=GPIO.LOW)
GPIO.setup(IN1, GPIO.OUT, initial=GPIO.LOW)
GPIO.setup(IN2, GPIO.OUT, initial=GPIO.LOW)

Stop

GPIO.output(ENA, GPIO.HIGH)
GPIO.output(IN1, GPIO.LOW)
GPIO.output(IN2, GPIO.LOW)
time.sleep(1)

Forward

GPIO.output(IN1, GPIO.HIGH)
GPIO.output(IN2, GPIO.LOW)
time.sleep(1)

Stop

GPIO.output(IN1, GPIO.LOW)
GPIO.output(IN2, GPIO.LOW)
time.sleep(1)

Backward

GPIO.output(IN1, GPIO.LOW)
GPIO.output(IN2, GPIO.HIGH)
time.sleep(1)

Stop

GPIO.output(ENA, GPIO.LOW)
GPIO.output(IN1, GPIO.LOW)
GPIO.output(IN2, GPIO.LOW)
time.sleep(1)

GPIO.cleanup()

hello furkantoptang4,

are you using Nano developer kit? or, it’s a customize carrier board?

Im using recomputer j1020.

hello furkantoptang4,

Jetson-GPIO python library only works with developer kits.
you may see-also Topic 144550, for several ways to access GPIOs. such as, kernel APIs, python scripts, C++ samples.

what about RPi.GPIO library cant work? I need to solve this problem what be fast. I looked the Topic 144550 but its not useful for me and Im using python.Im just run dc motors basicly. How can I do that? Should ı use different library or download anything what should ı do?Please help. Thank you.

Can anyone help? I need to solve this problem.Help please.

hello furkant,

by checking https://files.seeedstudio.com/wiki/reComputer/reComputer-J1020-datasheet.pdf,
it’s mentioned… reComputer J1020 is compatible with the entire NVIDIA Jetson software stack
you may see-also seeedstudio wiki page.

may I also know what’s the actual failure? can you set pin numbers for using those GPIO functions?

1 Like

I cant’ use GPIO pins.I tried to run dc motors and it didn’t work.I tried the RPi.GPIO library and the Jetson.GPIO library .When I run my code,it ran but gpıo pins don’t do anything.

hello furkant,

how about enable GPIOs manually, are you able to toggle the pin via sysfs?
for example,
location of the GPIOs, /sys/class/gpio
taking GPIO220 as an example, you should generate gpio220 name with echo 220 > export
then… you’re able to enable the gpio and toggle the pin manually. echo out > direction && echo 1 > value

please check $public_sources/kernel_src/kernel/kernel-4.9/include/dt-bindings/gpio/tegra-gpio.h for GPIO pin definition and also the calculation formula for GPIO numbers.

I getting same warnings still.I can’t run motors with Jetson.GPIO library.How can ı run motors in Jetson recomputer j1020.Can’t I run dc motors?I need help.

Do you have any ability to check the GPIO pins with an oscilloscope with no load on the pins? Or even to manually set output to a 1 or 0 and check with a voltmeter? I’m wondering if it is an issue of load rather than one of configuration.

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