Rotate PiOLED screen 180 degrees


#1

Hi,
I have the lovely PiOLED display and it is currently running the useful utility:
Adafruit_Python_SSD1306/examples/stats.py

However, I would like to rotate the display 180 degrees, because the way my Pi is located, with power leads etc.
Is there a Python command I can add to stats.py to do this?
Note, I want to rotate, not flip the display.

Many Regards


#2

If I’m not mistaken you can just change:

disp.image(image)

to:

disp.image(image.rotate(180))

180 degree rotation should be pretty simple with PIL (the image library underpinning this example) so it hopefully wont do anything weird!


#3

Phil,
Genius - ‘disp.image(image.rotate(180))’ works perfectly on my setup.

Thanks,
Martyn