| News | Nasa Photo of the Day |
|---|---|
![]() |
![]() |
- Currently only works with Waveshare e-ink displays. (could be updated to work with other brands easily)
- This script currently runs on a Raspberry pi zero w that's connected to the net.
- It fetches a list of frame screens to be displayed via val.town (feel free to use your own backend)
- That list is then used to fetch the the next image in rotation based on which one is currently being displayed on the connected eink display derived from state.json.
- Create a free account on val.town and remix the eink-frame project
- Remove or add any frames you want and make sure to update the list near the beginning of index.tsx to include all the frames you want your device to pull from
- Follow the README, as you'll also need a API Flash api key for image generation.
- Clone this repo to your arduino or raspberry pi. Make sure you're device has internet access.
- Update the
BACKEND_URLin fetch_and_display_image.py with your remix of the val.town project - You may also need to update the imported waveshare eink display you're using in send_to_display.py
pip install -r requirements.txt
python fetch_and_display_image.pyYou can also tell it which frame to display using the param -F or --frame.
python fetch_and_display_image.py --frame weatherIf your WiFi credentials change, you don't need to SSH into the Pi or rebuild anything. Just run the setup portal from your phone:
python wifi_setup.pyThis creates a temporary WiFi access point called eink-frame-setup. Connect to it from your phone and a setup page will automatically appear where you can enter your new SSID and password. Once connected, the Pi shuts down the access point and joins your network.
How it works:
- The Pi creates an open access point (
eink-frame-setup) - A captive-portal-style web page is served at
http://10.0.0.1 - Enter your WiFi network name and password on the page
- The Pi saves the credentials to
wifi_credentials.jsonand connects - The access point shuts down automatically
Auto-connect on startup: The main script (fetch_and_display_image.py) now
attempts to connect using saved credentials before fetching images. If your Pi
loses power and reconnects, it'll automatically rejoin your WiFi network.
To manually connect with saved credentials (without starting the portal):
python wifi_setup.py --connectPrerequisites: The setup portal requires hostapd and dnsmasq, which are
installed automatically on first run if missing.
For ease of iteration, the backend was created on val.town. There you can view each frame and remix them if you'd like. You can view the image that will be sent down to the pi and make any changes you'd like. You can also control the list of images you'd like to show up on your pi so you don't have to log into the pi to change anything once it's set up.
pm2 start fetch_and_display_image.py --name fetch_and_display --no-autorestart --cron "0 7,19 * * *"
pm2 save
pm2 startup
pm2 logs fetch_and_displayOptional button and rotary button scrips available.
Right now, I'm using this design.
Here's another design if you're interested in adding a battery to your setup.

