Hi, I’ve just received an InkyPHAT (RED) purchased from Little Bird Electronics here in Australia. Runing through the samples I’ve found that the EEPROM isn’t detected (I assume the one I got was old-ish stock) I tried it on 2 different pi zero 2 w, both running the latest install of raspbian. SPI and I2C is ebabled on both.
Stepping into the code I find that auto.py gets a none from the call to eeprom.read_eeprom(i2c_bus=i2c_bus)
I’ve ended up passing --type=phat and --colour=red as arguments, that gets things running. Unfortunately the examples aren’t displaying correctly (see below). I’ve run clean.py a few times but it’s not helping.
A few questions:
Do I have an old version? I’ve included a photo of the back of the phat
I thought it used spi to access the phat, but it seems to be using i2c, is the i2c just for the eeprom?
If it’s the newer version and I need i2c to read the eeprom, is there a way to debug the i2c issue.
The logo was clear when it arrived, so I’m assuing it’s a coding issue. Anything else I could try?
I’ve got i2c enabled, I have a servo hat I can drive from it, so that’s got to be working, it really looks like it’s an older one :(
I’ll double check from a different device later on. I did wonder if it was the resolution that was off, so I changed it and the output was completely wrong, so I suspect it’s the right resolution, but the display might be bad (see my second comment)
It’d be good to get pictures of the boards of the various versions, so I can work out what mine is.
That looks to be a moderately old Inky - it doesn’t have an EEPROM chip so it won’t be able to auto-detect the resolution (but if it’s updatable with the inky library and has a big inductor on the back it’s not one of the problematic v1s!).
--type=phat and --colour=red should be correct in that case - you could try the ‘Build Your Own Code’ part of the Inky tutorial to see if that works any better than the examples (making sure to use the phat boilerplate, rather than the auto boilerplate)?
If it’s still not playing then you might have a faulty display - drop an email to email@example.com with a link to this thread and they’ll get you sorted.
Thanks! Now I know that’s not a problem at least. Mine looks exactly the same except for the 2 chips above the pimoroni logo. I’m still playing around with it, but displaying loaded images or images and text seem a bit blurry. Though I had some trouble with my own images, I couldn’t get the RED to display, it may have somethign to do with my images being 4bit, rather than 2.
However, I’ve had some OK results using set pixel:
from inky import InkyPHAT
inky_display = InkyPHAT("red")
colors = [InkyPHAT.BLACK, InkyPHAT.WHITE, InkyPHAT.RED]
colorCount = len(colors)
"""use the x and y values to calculate the color to display"""
color = colors[round((x+y)/2) % colorCount] # diagonal stripes
for x in range(inky_display.WIDTH):
for y in range(inky_display.HEIGHT):
inky_display.set_pixel(x, y, getColor(x,y))
By changing the divisor in getColor() I’ve changed the width of the stripes. Changing the colors list I changed the colors. Also horizotal trips by just using y and verticle by just using x.
Thanks for persevering! I tested a few different generation Inkys with the latest release yesterday, and I didn’t see anything like the blurriness you’re getting so I’m wondering if you have a faulty display - support should be able to sort it out.