Thank You! Own two Jetson Nano Boards and your videos just make this board so fun to experiment within my lab. Using the board in my AI Consulting demos!
I came here specifically to just say thanks. I do a lot of playing and hacking and I expected this to take two days to figure out because most of the time you end up down some crazy rabbit hole. This just worked. Followed your simple instructions and it just worked. Thank you.
This was just what I needed...Adding the ps4 controller to the mix is icing on the cake...Those 4 dislikes are Xbox1 fans...Keep on Rockin dude....and Thank you.
I am glad you found this useful. Haters gonna hate, pay them no heed. I don't accept criticism from people I wouldn't take advice from. The thumbs down is probably the silliest thing ever. Thanks for watching!
@@JetsonHacks Next time I receive criticism. I'm going to respond with, "I'm sorry I don't accept criticism from people I wouldn't take advice from". I'm certain that will be quite amusing, at least for me..Take care...Rick
Thanks for another great video. I am discerning from this and other info on the WEB that there is no easy way to do PWM on the Jetson Nano. I would think this is a much needed feature, as it would allow direct control of servos from the nano (with suitable power supply). Does anyone know if the issue of simple PWM on a nano GPIO pin has been solved. Did not find a solution looking around on the NVIDIA forums.
Thank you for the kind words. Like the Raspberry Pi, the Jetson has one PWM output. In order to get the PWM output to work, you will need to modify the device tree appropriately. This is the same process as the RPi (and any other Linux embedded computer). However, the RPi has a user facing application which will help reconfigure the device tree "on the fly" so that you can configure the GPIO pins as SFIO (Special Function Input Output) by selecting their function from a menu, and then rebooting the machine. There is no equivalent on the Jetson, though I do know that their engineers have been working on it. On the Jetson, it is more complicated than the RPi because the device tree is signed as protection against malicious intent. The RPi does not have that particular feature. Typically things like PWM are better performed off of the Linux machines (SBC) themselves, because Linux is not a real time operating system. Running PWM is rather clumsy and requires a bunch of CPU cycles to monitor and time the pulses correctly. Micro-contollers like an Arduino or dedicated hardware like a PCA 9685 are built specifically for these types of tasks, as well as have a wider variety of analog, digital and other types of inputs. Not that you can't do it on an RPi or Jetson, but certainly if you are running multiple servos you will need to do that anyway. Of course, you know this already by the large ecosystem of RPi "hats" which provide these different types of functions. Thanks for watching!
@@JetsonHacks Thank you for providing a detailed response to Paul McWhorter's question. It makes me think that I will stick with controlling the motors on my large robots with Arduino boards. I am keen however to discern how I can use the Jetson Nano in concert with Arduino's to autonomise the navigation of my robots. To that end, I will continue to consume the most excellent videos that both you and Paul have put together on the Nano. Many thanks!
@JetsonHacks It would be really nice if you could show how to use integrated PWM driver to use servos and how to change devicetree to be able to access to those peripherals. As always great video!
Thank you for the kind words. I'm not an expert on the subject, but in general if you want to control a servo motor with real-time response requirements, then you need to use hardware PWM. While the big brothers to the Nano (Jetson TX2 and AGX Xavier) have this capability through the SPE, the Nano does not. You can get software PWM running on the Nano, but you end up chasing your tail if your goal is to control servos. It's a much wiser decision to use a microcontroller (Arduino, Blue Pill, Teensy and so on) or dedicated hardware like the PCA9685. Thanks for watching!
@@JetsonHacks I know that for RT application usage of external dedicated controller is better option. But as far as I read in Jetson.GPIO library is says that Xavier has 3 hardware controllers, Nano has them 2, but TX2/TX1 has none of them. (Point 11 in README.md on library Github)
Interesting. The Jetson Sensor Processing Engine (SPE) Developer Guide says that the TX2 also has a Cortex-R5 micro-controller for this purpose, so someone is fibbing. Unfortunately I don't think it makes much sense at this point to modify the device tree with the next revision of the OS right around the corner. No telling what they've changed.
Hi JetsonHacks. I have a few questions for you to answer. when when i execute the below code: from adafruit_servokit import ServoKit kit = ServoKit(channels=16) ki.servo[0].angle = 90 I got the following error: NotImplementedError: pwmio not supported for this board i did it the same way you do. Can you help me fix it?
Thank you for the kind words. The PWM board mounts to the breadboard by header pins which are soldered to the board. It's been a while, but I believe that the Adafruit board that I was using included the header pins in the package. After soldering the header pins onto the PWM board, plug the header into the breadboard. Thanks for watching!
JetsonHacks I bought the pwm board and soldered the pins but they do not stick out long enough through the back to connect to the breadboard. Connecting the pins to the breadboard is where I’m stuck.
Loving your content!!!!! Can you pleaaseee do a video on vSLAM - comparing Inter RealSense T265 + D435 vs TaraXL!!! Would love to hear what you have to say!
Right joystick isn't working. It's mapped to RT. RT starts in 0 range and when pressed it goes eg 90 deg right and then 180 deg left. I've tried remapping via dualshock4.py file and even in jstest-gtk. Any suggestions?
It depends on which stepper motor drivers you use. Typically once you need direct control of more than a couple of stepper motor drivers you use a microcontroller of some sort, and then have a microprocessor, like a Jetson, control the microcontroller. There are some stepper motor drivers which can control multiple stepper motors and communicate of USB. It depends on the requirements, the protocol the stepper motor uses (SPI, USB, PWM, UART and so on), and how the driver needs to be controlled. Good luck on your project!
Why at 9:50 after the angle supposedly set to 3, then when the angle is set to 177 (which should be nearly the opposite direction from 3 ) the servo only looks like it turned about 90 degrees?
Hi JetsonHacks, I was wondering if a power source is necessary for the PCA9685 board if my motor has an external power source directly connected to it and I'm just sending signals to the electronic speed controller (also powered by the external power source). I wasn't sure if the power source for the PCA board is needed only to supply the motor (which in my case, I wouldn't need)
@@JetsonHacks When I try to detect devices connected to the i2c bus, it doesn't show anything and I was wondering if it had to do with not powering the PCA9865 board? However, I don't even need the power line from the PCA board to connect to my esc, since my esc is already powered by a battery.
If you are connecting to the wall, use a 5V, 2+ amp power supply. If it is for mobile use, you can use something like 4 or 5 x AA battery pack to connect to the terminal block. Thanks for watching!
Thank you very much. That was really easy, except for the single servo test. I wired my PCA9685 on the I2C-Bus 0 as you did it, but I had to initialize it on ServoKit initialization with >>> kit = ServoKit(channels=16, i2c=ic2_bus0) Without the "i2c=i2c_bus0", it didn't work, maybe because i2c_bus1 is the default, since you said so. And I also have big trouble with my servos. They are capable to lift 25 kg (about 50 lb), but the starting current is so high that the voltage collapses and the servos keep resetting all the time. Do you have a tip for me?
The single servo demo in the video was on bus 1, Pins 3 and 5. The current is limited on this little board, what is the current and voltage requirements for your servos?
Hi, in my project I am using the Adafruit PCA9685 to generate PWM signals. Is there a sample code (C or python) in which you show how to only create these signals (not involving the Servos)? I really like your videos !
My GIPOs are not showing any output(voltage) although the code is running properly. I have also tried to blink an led (with and without transistor) but still not working...plz helppp
emic2 text-2-speech module is what I'm having trouble with. I'm used to working on an Atmega controller which of course doesn't have that pesky OS to get in the way. I'm most interested to see what changes must be made with the OS (privileges, user space/kernel space, etc.) to allow UART communication.
Hello sir, there are 2 questions on 5:49. 1. When I write sudo i2cdetect -y -r -1 (as I wired in i2c bus 1), I see only 68. But here I can see 2 numbers in your tutorial (40 & 70). Why it's like that? 2. When I write groups, I see something like $user_name adm dialout cdrom sudo audio dip video plugdev lpadmin gdm sambashare gpio. In your tutorial the "dialout" flag is missing. Why is so?
Not sure I understand your questions. I2C Bus 0 has different devices than I2C Bus 1. You can have different groups depending on your user permissions.
Hello, I'm having a hard time to determine which GPIO pins must be connected to the stepper motor driver RMCS1120. I need assistance in determining which specific GPIO pins on the Jetson Nano should be used to connect the PUL+, PUL-, DIR+, DIR-, ENA+, and ENA- pins of the RMCS1120 stepper motor driver. Kindly please help. I had a look at the specifications for the RMCS1120 stepper motor driver, but I'm unable to figure this out. Please please help.
This is not something I can help you with. Please ask for help on the official Jetson Nano forums: forums.developer.nvidia.com/c/agx-autonomous-machines/jetson-embedded-systems/jetson-nano/76
You need to read the specifications for the RMCS1120 stepper motor driver to determine if it can control 3 stepper motors. It's not clear how it would be able to do that as it appears to only have a single set of outputs. Stepper motors typically have 4 wires to drive them in the most common configuration.
Yes. You will need to configure the Jetson to emit PWM signals to drive the data wire. On the Jetson Nano, the PWM signal is not as precise as having a dedicated microcontroller as shown in the video, and there are only two PWM outputs as I recall. If you need more help with PWM on the Jetson Nano, please ask on the official NVIDIA Jetson Nano forum where a large group of developers and NVIDIA engineers share their experience. Thanks for watching!
Love your videos. This I2C video is really specific to the Adafruit board. I have data on an Arduino Mega that I am trying to send to a Jetson nano and could not use this as a guide. Could you do a more general i2c video?
Thank you for the kind words. I don't know what a "more general I2C video" might be. The Arduino has to run a program for sending/receiving data over I2C, and you need one on the Jetson side. The code for reading and writing to I2C on the Jetson is in the libraries. libi2c is for C/C++ and Python, Jetson.GPIO can be used also. Thanks for watching!
Hi, very nice content and quite to the point.... I have attempted to get this done and still struggling. My code loads fine but nothing happen: i receive a message:exiting, cleaning pins and when I check the i2c i see x40 but not any more x70. I need to restart and unplug to be able to get x70 back.
@@JetsonHacks HI Jim, I think was a trivial error in the code which for some reason wasn't casting a syntax error.... however I have recently upgraded my jetpack to 4.6 and it seems your installation does not run as smooth as it used. It gives: "Collecting Adafruit-Blinka>=7.0.0 (from adafruit-circuitpython-servokit) Could not find a version that satisfies the requirement Adafruit-Blinka>=7.0.0 ". I searched in the community but I did not manage to make it work.... installed blinka and so on... are you planning to upgrade this repository as well?
@@JetsonHacks Jim, txs for your kind reply. Seems not easy: added the installation for blinka but still is requesting the version 7. tried to revert to previous jetpack and getting all a series of problem. The Nano seems a bit beyond my capacities!
Thank you for your informative videos. I am using them alongside Paul McWhorter's Learning AI with Jetson Nano. I am looking for a patch or fix to the error that is thrown when I attempt to install the adafruit-circuitpython-servokit : Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-h9k6l_16/adafruit-circuitpython-servokit/ I am using the SD image jp451, Ubuntu 18.04 LTS, Jetpack 4.5, and Python 3.6.9 -which is preinstalled on my 4GB Nano. Have you any experience with this error code? If it should be a python issue, any suggestions on how to properly upgrade python so as not to cause errors? Thanks for any help you can offer?
I have a yahboom expansion board connected to a jetson nano, the expansion board has two sets of pwm servo interfaces, one is JST the other Micro-Jst. Out of the box I have code to control the servos connected to Micro-Jst, however I need to connect a more powerful servo on the Jst interface. How would I send code to Jst servo interface rather than micro-jst? I cannot find datasheet for expansion board, only a diagram with vague labels of each set of pins.
I don't know the answer. You should contact yahboom for technical support, or find a library that interfaces with the board. Good luck on your project!
@@JetsonHacks they sent me a link to their github which I have thoroughly studied. Only docs for board is a picture with vague labels. I think I will use a different expansion board or a servo hat to drive the servos.
@@pottoker612 Hardware is like that, it's difficult to make the correct guess as to how you interface with it. Going to something else is probably a good idea. Good luck on your project!
hello, what steps do i need to follow for a single servo on jetson nx? I want to be totally break board independent. Also, if possible, using python2 or c++. thanks.
You can use the code linked in the article as reference. You can rewrite the code as needed for whatever your breakout board and programming language requirements might be. Thanks for watching!
I do not know the answer to your question. If you are wiring to the GPIO header, the busses are 0 and 1. I do not know what "pin 50 and 57" mean, i2cdetect prints out addresses.
I'm not big on comparisons, it's a lot of busy work and there's no work product at the end of it. Plus, I can't do it any better than: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-kbn_6ixtIpA.html
You can consider simple USB CNC controllers like this one from Adafruit: TinyG CNC Controller Board v8 www.adafruit.com/product/1749?gad_source=1&gclid=CjwKCAjw17qvBhBrEiwA1rU9w98i4X8kytc4E0Hh11mLczvNOxvxOm91x_bb1XUk5cI5R0JNQpVZyBoCZKUQAvD_BwE There are a large number of this class of boards, you can check on Amazon or eBay. Typically they're for CNC machines or 3D printers.
Thank you for your effort I have a problem in ps4 controller , the mapping is still inverted and right analog changed with l2 and r2 even though i sudo cp dualshock4.py ??
I wish to use a stepper motor for one of my projects on the Jetson Nano. 1. How do I go about connecting and using a stepper motor on the Jetson Nano? 2. Which stepper motor is compatible on the Jetson Nano?
That's a pretty large subject. First select which stepper motor you wish to use and the requirements such as unipolar or bipolar. Next, people generally decide which stepper motor driver is appropriate for their application. The stepper motor driver will determine which interface protocol should be used such as PWM, SPI, serial, USB, I2C. Then you will need to decide how to interface to the stepper motor driver with your Jetson, or whether you need to interface with a microcontroller which controls the stepper motor driver. The microcontroller may be more convenient if you have to control the low level signal timing. Good luck on your project! Dronebot Workshop has several videos on controlling stepper motors of varying sizes, for example: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-0qwrnUeSpYQ.htmlsi=rF78RCSh3_Dcp-Aq Good luck on your project!
@@Bwajster You need to study more about stepper motors. The Jetson Nano does not drive a stepper motor. It interfaces to a stepper motor driver, which in turn interfaces with the stepper motor itself. The driver handles the unipolar/bipolar. Stepper motors come in a very large variety of sizes, to say "stepper motor" doesn't narrow it down enough to provide any information. I would suggest that you watch the video mentioned previously to better understand the different types of stepper motors and how to drive them.
@@JetsonHacksAlright thank you so much. I'll have a look at video, later how do I figure out which stepper motor and driver are compatible with the Jetson Nano ?
Hi! Love your tutorials! I have followed the steps and things went well, but I got an error below when I input "kit = ServoKit(channels=16) " at 9:19, where showed: Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/adafruit_bus_device/i2c_device.py", line 68, in __init__ i2c.writeto(device_address, b'') File "/usr/local/lib/python3.6/dist-packages/busio.py", line 69, in writeto return self._i2c.writeto(address, buffer, stop=stop) File "/usr/local/lib/python3.6/dist-packages/adafruit_blinka/microcontroller/generic_linux/i2c.py", line 38, in writeto self._i2c_bus.write_bytes(address, buffer[start:end]) File "/usr/local/lib/python3.6/dist-packages/Adafruit_PureIO-0.2.3-py3.6.egg/Adafruit_PureIO/smbus.py", line 244, in write_bytes OSError: [Errno 121] Remote I/O error During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/adafruit_bus_device/i2c_device.py", line 74, in __init__ i2c.readfrom_into(device_address, result) File "/usr/local/lib/python3.6/dist-packages/busio.py", line 59, in readfrom_into return self._i2c.readfrom_into(address, buffer, stop=stop) File "/usr/local/lib/python3.6/dist-packages/adafruit_blinka/microcontroller/generic_linux/i2c.py", line 44, in readfrom_into readin = self._i2c_bus.read_bytes(address, end-start) File "/usr/local/lib/python3.6/dist-packages/Adafruit_PureIO-0.2.3-py3.6.egg/Adafruit_PureIO/smbus.py", line 155, in read_bytes OSError: [Errno 121] Remote I/O error During handling of the above exception, another exception occurred: Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.6/dist-packages/adafruit_servokit.py", line 86, in __init__ self._pca = PCA9685(i2c, address=address, reference_clock_speed=reference_clock_speed) File "/usr/local/lib/python3.6/dist-packages/adafruit_pca9685.py", line 131, in __init__ self.i2c_device = i2c_device.I2CDevice(i2c_bus, address) File "/usr/local/lib/python3.6/dist-packages/adafruit_bus_device/i2c_device.py", line 76, in __init__ raise ValueError("No I2C device at address: %x" % device_address) ValueError: No I2C device at address: 40 How come? Not sure how to sort it... thanks for your help!
@@Barsay Computer PWM signals are typically 25kHZ. Typically they are used to run peripherals like fans, servos and so on with the duty cycle being the variant. I don't have enough experience with audio applications of PWM from the PWM drivers to offer an answer. You should ask this question on the official NVIDIA Jetson Nano board, where a large group of developers and NVIDIA engineers share their experience.
This is a big question that's too difficult to answer as a RU-vid comment. Please ask the question on the official NVIDIA Jetson Nano forum, where a large group of developers and NVIDIA engineers share their experience: forums.developer.nvidia.com/c/agx-autonomous-machines/jetson-embedded-systems/jetson-nano/76
Hi. I have run your script on a clean install of Jetpack 4.2 which, I believe, is the one you use in this video. After the initial Ubuntu setup palaver I do a sudo apt-get update and then install git.Then I run your script which seems to run perfectly and I get added to the groups etc, etc. I wire my PCA9685 to pins 27 & 28 (i2C_0). Then I copy the first few lines of your servoPlay.py script into a file I call servoTest.py and when I run it I always get this error : from adafruit_servokit import ServoKit import board import busio import time i2c_bus0 = (busio.I2C(board.SCL_1, board.SDA_1)) kit = ServoKit(channels=16, i2c = i2c_bus0) Traceback (most recent call last): File "servoTest.py", line 6, in i2c_bus0 = (busio.I2C(board.SCL_1, board.SDA_1)) File "/usr/local/lib/python3.6/dist-packages/busio.py", line 31, in __init__ self.init(scl, sda, frequency) File "/usr/local/lib/python3.6/dist-packages/busio.py", line 59, in init from machine import I2C as _I2C ModuleNotFoundError: No module named 'machine' The error seems to indicate that the Jetson Nano board is not being detected and I have not found any references to this particular problem anywhere. Have you any ideas as to why I seem to be the only one suffering this? Thanks in advance for any reply.
The error message indicates that it can not find the Python module machine. Have you tried: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-eImDQ0PVu2Y.html
Has anyone received this error when installing the game pad? Thanks for the tutorials! They're helpful. Collecting approxeng.input Using cached files.pythonhosted.org/packages/1c/27/418500122ddff3e29355c5f248b20690555102c59037961968583262ae55/approxeng.input-2.4.2.tar.gz Complete output from command python setup.py egg_info: Traceback (most recent call last): File "", line 1, in File "/tmp/pip-build-t2inutxw/approxeng.input/setup.py", line 2, in from setuptools import setup, find_namespace_packages ImportError: cannot import name 'find_namespace_packages' ---------------------------------------- Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-t2inutxw/approxeng.input/
When I try to install game pad it throws me an error: Commam "python setup.py egg info" failed with error code 1 in /tmp/pip-build-vgtlwxd/aproxeng.imput
Hi! Love your tutorials! I have followed the steps and things went well, but I got an error below when I input from 'adafruit_servokit import ServoKit' File "", line 1, in File "/usr/local/lib/python3.6/dist-packages/adafruit_servokit.py", line 35, in import board File "/usr/local/lib/python3.6/dist-packages/board.py", line 39, in import adafruit_platformdetect.constants.boards as ap_board File "/usr/local/lib/python3.6/dist-packages/adafruit_platformdetect/__init__.py", line 10, in from .board import Board File "/usr/local/lib/python3.6/dist-packages/adafruit_platformdetect/board.py", line 24 from __future__ import annotations ^ SyntaxError: future feature annotations is not defined Help me
@@rchobby7564 It's hard to tell what you are doing from the description. I can not tell which version of Python you are using, or the version of JetPack.
henkoegema@JetsonNano: What could be the error here? : (JetsonNano 2GB) ~/Documents/ServoKit$ ./installServoKit.sh cp: cannot stat '/opt/nvidia/jetson-gpio/etc/99-gpio.rules': No such file or directory Reading package lists... Done Building dependency tree Reading state information... Done python3-pip is already the newest version (9.0.1-2.3~ubuntu1.18.04.5). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Collecting adafruit-circuitpython-servokit Downloading files.pythonhosted.org/packages/a2/65/5da8d1d4a22701fedf9dbae9094e40185d58be25b86175eb0861d55398a5/adafruit-circuitpython-servokit-1.3.10.tar.gz Complete output from command python setup.py egg_info: /usr/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type' warnings.warn(msg) Traceback (most recent call last): File "", line 1, in File "/tmp/pip-build-tb0z96hc/adafruit-circuitpython-servokit/setup.py", line 61, in py_modules=["adafruit_servokit"], File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 129, in setup return distutils.core.setup(**attrs) File "/usr/lib/python3.6/distutils/core.py", line 108, in setup _setup_distribution = dist = klass(attrs) File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 372, in __init__ _Distribution.__init__(self, attrs) File "/usr/lib/python3.6/distutils/dist.py", line 281, in __init__ self.finalize_options() File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 528, in finalize_options ep.load()(self, ep.name, value) File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2324, in load return self.resolve() File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2330, in resolve module = __import__(self.module_name, fromlist=['__name__'], level=0) File "/tmp/pip-build-tb0z96hc/adafruit-circuitpython-servokit/.eggs/setuptools_scm-7.0.0-py3.6.egg/setuptools_scm/__init__.py", line 5 from __future__ import annotations ^ SyntaxError: future feature annotations is not defined ---------------------------------------- Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-tb0z96hc/adafruit-circuitpython-servokit/ henkoegema@JetsonNano:~/Documents/ServoKit$