I had a similar problem with my Inky Impression 4" and a Raspberry Pi Model B+ v1.2. Any Python script that was going to render something to screen failed, but non-rendering scripts (like buttons.py) worked fine. Weirdly, even screen rendering scripts worked fine up until a point.
I was able to fix it by updating the timeout
variable in the Inky’s driver file. Specifically, at the time of writing, this file:
pi/.virtualenvs/pimoroni/lib/python3.11/site-packages/inky/inky_uc8159.py
I replaced this line:
def _busy_wait(self, timeout=40.0):
With:
def _busy_wait(self, timeout=60.0):
‘Fix’ is maybe not the right word. I ‘lengthened’ the timeout to a time long enough for my (old and clunky) Pi to do the rendering.
If you read the lines of code under the timeout
, you’ll see some mention of busy pin:
"""Wait for busy/wait pin."""
# If the busy_pin is *high* (pulled up by host)
# then assume we're not getting a signal from inky
# and wait the timeout period to be safe.
if self._gpio.get_value(self.busy_pin) == Value.ACTIVE:
Maybe there’s more to it, like this pin isn’t properly being made ‘unbusy’ when it ought to be. But this is beyond me.
Resources that helped me: