Skip to content

GPIO not allocated #2

Closed
Closed
@craigerl

Description

@craigerl

Hey, thanks for implementing the lgpio fixes.... following your new readme with on a Pi with bookworm,

pi@digipi:~/git/Python_ILI9486 $ .venv/bin/python image.py
/home/pi/git/Python_ILI9486/.venv/lib/python3.11/site-packages/RPi/GPIO/init.py:622: Warning: No channels have been set up yet - nothing to clean up! Try cleaning up at the end of your program instead!
warnings.warn(Warning(
Traceback (most recent call last):
File "/home/pi/git/Python_ILI9486/image.py", line 18, in
lcd = LCD.ILI9486(dc=config.DC_PIN, rst=config.RST_PIN, spi=spi).begin()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/pi/git/Python_ILI9486/ILI9486.py", line 117, in init
GPIO.setup(self.__dc, GPIO.OUT)
File "/home/pi/git/Python_ILI9486/.venv/lib/python3.11/site-packages/RPi/GPIO/init.py", line 704, in setup
initial = _check(lgpio.gpio_read(_chip, gpio))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/pi/git/Python_ILI9486/.venv/lib/python3.11/site-packages/lgpio.py", line 906, in gpio_read
return _u2i(_lgpio._gpio_read(handle&0xffff, gpio))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/pi/git/Python_ILI9486/.venv/lib/python3.11/site-packages/lgpio.py", line 461, in _u2i
raise error(error_text(v))
lgpio.error: 'GPIO not allocated'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions