I have a raspberry pi 4 with a inkyWHAT display, I've managed to get the display showing my own images.
What I need help with is to run the following commands one after the other, at present I paste each line in one at a time:
from PIL import Image
from inky import InkyWHAT
inky_display = InkyWHAT("yellow")
inky_display.set_border(inky_display.YELLOW)
img = Image.open("/home/pi/Desktop/test2.jpg")
w, h = img.size
h_new = 300
w_new = int((float(w) / h) * h_new)
w_cropped = 400
img = img.resize((w_new, h_new), resample=Image.LANCZOS)
x0 = (w_new - w_cropped) / 2
x1 = x0 + w_cropped
y0 = 0
y1 = h_new
img = img.crop((x0, y0, x1, y1))
pal_img = Image.new("P", (1, 1))
pal_img.putpalette((255, 255, 255, 0, 0, 0, 255, 255, 0) + (0, 0, 0) * 252)
img = img.convert("RGB").quantize(palette=pal_img)
inky_display.set_image(img)
inky_display.show()
Not only that, but I'd like to run this every 15 minutes, or so. With no interaction from me at all.
I appreciate this may be really basic for some but this will be my very first time venturing into this kind of thing.