Hi all,
I'm using the Portenta X8 and breakout board.
As I understand I need to use "gpiochip5" but it raises the following error
OE = periphery.GPIO("/dev/gpiochip5",3, "out")
File "/usr/local/lib/python3.9/site-packages/periphery/gpio_cdev1.py", line 140, in init
self._open(path, line, direction, edge, bias, drive, inverted, label)
File "/usr/local/lib/python3.9/site-packages/periphery/gpio_cdev1.py", line 191, in _open
self._reopen(direction, edge, bias, drive, inverted)
File "/usr/local/lib/python3.9/site-packages/periphery/gpio_cdev1.py", line 269, in _reopen
raise GPIOError(e.errno, "Opening output line handle: " + e.strerror)
periphery.gpio.GPIOError: [Errno 16] Opening output line handle: Resource busy
when try with different "gpiochip0-4" I am not getting this error but the GPIOs isn't functioning.
I added the devices on the docker-compose.yml file
devices:
- '/dev/i2c-0'
- '/dev/i2c-1'
- '/dev/i2c-2'
- '/dev/i2c-3'
- '/dev/gpiochip0'
- '/dev/gpiochip1'
- '/dev/gpiochip2'
- '/dev/gpiochip3'
- '/dev/gpiochip4'
- '/dev/gpiochip5'
- '/dev/ttymxc1'
this is a part of the code:
OE = periphery.GPIO("/dev/gpiochip5",3, "out") # GPIO_PF4 = gpio_3 J2_52 163
OE.write(True)
time.sleep(2)
OE.write(False)
time.sleep(2)
also tried it like this:
OE = periphery.GPIO(163, "out") # GPIO_PF4 = gpio_3 J2_52 163
Please help me make the GPIOs working
Thank you!