Welcome to Muto S2 Robot repository
5.Hardware library configuration
5.Hardware library configuration
You can check this link: https://pypi.org/project/Jetson.GPIO/ Or https://github.com/NVIDIA/jetson-gpio
1.Environmental configuration
- Download jetson-gpio:
git clone https://github.com/NVIDIA/jetson-gpio

2.Move the downloaded files to the directory:/opt/nvidia. If this library exists in your directory, we need to backup the original directory as follows:

Then place the downloaded folder in the opt/nvidia/directory. Since I am placing the folder in the path~/and currently in opt/nvidia/, I can execute the following command to move the folder sudo mv~/jettson gpio/

- Install pip3 tool
xxxxxxxxxxsudo apt-get install python3-pip
- Enter the Jetson gpio library folder and install the library.
xxxxxxxxxxcd /opt/nvidia/jetson-gpio sudo python3 setup.py install

- Before using, you also need to create a GPIO group, add your current account to this group, and grant usage permissions
xxxxxxxxxxsudo groupadd -f -r gpiosudo usermod -a -G gpio user_name

xxxxxxxxxxsudo cp /opt/nvidia/jetson-gpio/lib/python/Jetson/GPIO/99-gpio.rules /etc/udev/rules.d/
In order for the new rule to take effect, you need to reboot or reload the udev rule by running the following command
xxxxxxxxxxsudo udevadm control --reload-rules && sudo udevadm trigger
Attention: user_ Name is the username you use, such as Jetson