Inkyphat display rotation command changed?

I used to use inkyphat.set_rotation(180) but this seems no longer to work. I think it’s been changed to inky_display (whatever) but I can’t find out what the syntax is now. Tried googling for help to no avail. I’m not naturally gifted in python lanuage and am looking for advice on what the inky_display syntax for a 180 degree rotation is now.

Is there a file or website that has examples of all available commands are?

Thanks in advance.
Dougie.

I couldn’t find any rotation method in the new inky library, but I’ve managed to achieve the same result by using the PIL Image rotate method just before setting inky display:

from inky import InkyWHAT
inky_display = InkyWHAT("red")
inky_display.set_border(inky_display.WHITE)

from PIL import Image, ImageFont, ImageDraw
img = Image.new("P", (inky_display.WIDTH, inky_display.HEIGHT))
draw = ImageDraw.Draw(img)

# Draw your text and images
# ...

flipped = img.rotate(180)
inky_display.set_image(flipped)
inky_display.show()

I hope this helps you!

1 Like

Thanks carlesbellver I will try that tonight.