Source code for drawing daily schedules on an e-ink screen.
Running example on M.ICU
Development environment
- Raspberry Pi zero 2w (Raspberry Pi OS 32-bit (Bookworm))
- Pimoroni Inky Impression 7.3" (2025) [e-ink]
- Python 3.12
- Written on Win11
Scripts
routines.pyis where the user defines what to displaytaskTemplates.pydefines task presets; each valid task should have an entry here then can be referenced inroutines.pydraw.pycontains Renderer classes that draws image outputscheduler.pycalls Renderers to update display on certain timepointsdisplay.pyis for connecting with the Inky Impression e-ink screenuploader.pyauto uploads drawn image to a server defined incfg/upload_config.jsoncoords.pyare tedious layout coordsstyle.pycontains text styles used in drawing; needs clean-upresources/include background image, logos, etc.
Dependencies
python3.12 -m pip install numpy pillow requests lunar_python inky
python3.12 -m pip install openai icalendarp.s. numpy builds super slowly.
For full support of Pillow:
sudo apt install libjpeg-dev zlib1g-dev libpng-dev libfreetype6-dev liblcms2-dev \
libopenjp2-7-dev libtiff-dev libwebp-dev tcl-dev tk-devRunning as service
Assume the project is dropped at /home/pi/Timetable4Inky
sudo nano /etc/systemd/system/inky.service[Unit]
Description=My Python Scheduler
After=network.target
[Service]
ExecStart=/usr/local/bin/python3.12 /home/pi/Timetable4Inky/scheduler.py
WorkingDirectory=/home/pi/Timetable4Inky
Restart=always
User=pi
StandardOutput=journal
StandardError=journal
Environment=PYTHONUNBUFFERED=1 ; ensures log output
[Install]
WantedBy=multi-user.targetif using venv, replace execstart with:
ExecStart=/home/pi/Timetable4Inky/venv/bin/python /home/pi/Timetable4Inky/scheduler.pyRun service:
sudo systemctl daemon-reexec & sudo systemctl daemon-reload
sudo systemctl enable myscheduler & sudo systemctl start myschedulerCheck stat & log:
sudo systemctl status inky
journalctl -u inky -f