A small display that shows a piece of Reddit's r/place canvas and allows you to navigate through it.
- Raspberry Pi Pico W
- Pico Display Pack 2.0
RP Pico doesn't have enough memory to store the entire canvas. This is why the solution is divided into two parts: the server and the client sides. The server part can be hosted on a Raspberry Pi Zero W using Flask framework:
@app.route('/png', methods=['GET'])
def png():
x = request.args.get('x', default = 0, type = int)
y = request.args.get('y', default = 0, type = int)
img = Image.open('final_2023_place_2x.png', mode='r')
crp_img = img.crop((x, y, x+320, y+240))
img_byte_arr = io.BytesIO()
crp_img.save(img_byte_arr, format='PNG')
img_byte_arr.seek(0)
img.close()
return send_file(
img_byte_arr,
attachment_filename='crop.png',
mimetype='image/png'
)
Amend main.py
with your WiFi SSID and password, update the server-side URL and save the file on the Pico.