Inky pHAT/wHAT: Hello... my name is:
Use Inky pHAT/wHAT as a personalised name badge!
Detected 7-Colour (UC8159)
/usr/local/lib/python3.9/dist-packages/inky/inky_uc8159.py:323: UserWarning: Busy Wait: Held high. Waiting for 0.20s
warnings.warn("Busy Wait: Held high. Waiting for {:0.2f}s".format(timeout))
/usr/local/lib/python3.9/dist-packages/inky/inky_uc8159.py:323: UserWarning: Busy Wait: Held high. Waiting for 32.00s
warnings.warn("Busy Wait: Held high. Waiting for {:0.2f}s".format(timeout))
Basically every script return just ‚Busy Wait‘.
I’ve mounted the Pi on the HAT.
The buttons.py script in the 7colors folder works fine:
buttons.py - Detect which button has been pressed
This example should demonstrate how to:
1. set up RPi.GPIO to read buttons,
2. determine which button has been pressed
Press Ctrl+C to exit!
Button press detected on pin: 24 label: D
Button press detected on pin: 16 label: C
Button press detected on pin: 6 label: B
Button press detected on pin: 5 label: A
Button press detected on pin: 5 label: A
I recommend that you contact support linking to this thread. The display-size (height) given by identify.py is also off by one. Maybe the display has a problem.
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:
‘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.
I have a vague recollection that, on the 4" version of Inky Impression, the busy pin is never brought low by the display controller, or is perhaps not connected at all. The schematic for the 5.7" version indicates that it should be connected. Perhaps the pin is incorrectly configured in the Python module.
I can confirm this vague recollection. I have some old test-code for the Inky-Impression 4" in CircuitPython and I just discovered that I explicitely don’t use the busy-pin. CircuitPython is smart enough to just wait a predefined time when I don’t pass a busy-pin to the driver. So this is like the code above with the time-out parameter.