Runs an HTTP server that will draw images on the screen.
Useful for setting up a small digital frame that can be remotely controlled.
- In
main/server.h
, editWIFI_SSID
andWIFI_PASSWORD
to match your wifi config - In
main/main.c
, editn_epd_setup
to refer to the right EPD screen
flash (idf.py flash
), then connect the EPDiy to a power source (computer is fine).
The endpoints are:
GET /
, prints the screen temp / height / width as headersPOST /clear
, clears the screenPOST /draw
, expects:- a body that is a binary stream already encoded to EPDiy's standards (like the one in
dragon.h
). - Headers
width
,height
- Optional headers
x
,y
(default to 0) - Optional header
clear
, if set to nonzero integer will force-clear the screen before drawing
- a body that is a binary stream already encoded to EPDiy's standards (like the one in
send_image.py
is a friendlier client.
$ ./send_image.py ESP_IP info
EpdInfo(width=1024, height=768, temperature=20)
$ ./send_image.py ESP_IP clear
# Clears the screen
$ ./send_image.y ESP_IP draw /tmp/spooder-man.png
# Draws on screen
Thanks to argparse, all arguments are visible with --help
.
Requires requests
and PIL
(or Pillow)