Hello dear community.
I am doing a project in which I need to use the GPIO ports but everytime I need to grant permission by running
sudo chmod 666 /sys/class/gpio/gpio388/value
Is there a way to grant permission without running the above command? Is it possible to write the permission in the bash file?
Thank you in advance
please refer to Topic 144550, for several ways to access GPIOs. such as, kernel APIs, python scripts, C++ samples.
Thank you @JerryChang
I have followed the step in the link you mention above jetson-gpio
But when I run the sample_out.py I got this error
Exception: Cannot find GPIO chip 3160000.i2c/i2c-0/0-0074
I need to mention that I am using the orbitty carrier board with the TX2.
it’s due to Jetson GPIO it only supports with Developer Kits.
The orbitty carrier board has this pinout:
Also this is the reference table
Every time I have to run
echo 388 > /sys/class/gpio/export so I can use the GPIO 388
So I have to grant permission every time.
Do you have an advice?
you may have kernel driver implementation to control GPIO-388 from low-level driver instead of sysnodes.
How can I create a kernel? or where I can read about kernels?
please visit Jetson Linux | NVIDIA Developer to download L4T Driver Package (BSP) Sources.
you should also check Kernel Customization chapter for setting up build environment and compile your own kernel image.
you may refer to some standard APIs to access GPIOs from kernel side.
static inline int gpio_get_value(unsigned int gpio)
static inline void gpio_set_value(unsigned int gpio, int value)
Thank you for your answer. This seems to be more complicated than I expected.
I just want to control RGB LED common anode with the TX2 Orbitty carrier board and I do not find any solution to control the RGB led using python.
Do you have any other advice? or Shall I build my own kernel as the only solution?
to grant permission, you’ll need to build your own kernel to toggle the pin.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.