How attaxia/spectra6_photoframe works
The repository is a photo-frame system: users supply an image, the Node server prepares device-sized, palette-mapped output, and either a Raspberry Pi or ESP32 retrieves it and refreshes the Waveshare display. The ESP32 also offers Wi-Fi/server configuration; the Pi path uses the included Waveshare driver. Server route and upload behavior is documented in the README and partially visible in server.js. Some client orchestration and server route internals were not sampled, so uncertain implementation links are omitted.
Main entry points: imageProcessor.js Image processor · server.js HTTP image API · epd_bmp.py BMP display script · epd7in3e.py Waveshare display driver
Components 22
Image server
- HTTP image API
server/server/server.js - Upload UI
server/server/server.js - Configured image
- Image preparation
server/server/server.js
Image processing
- Image processor
server/server/imageProcessor.js - Palette dithering
server/src/dither/dither.ts - Palette selection
server/src/index.ts - Device color mapping
server/src/replaceColors/replaceColors.ts
Raspberry Pi client
- BMP display script
python/epd_bmp.py - Waveshare display driver
python/lib/waveshare_epd/epd7in3e.py - Pi GPIO and SPI
python/lib/waveshare_epd/epdconfig.py
ESP32 client
- ESP32 firmware
esp32/esp32.ino - Wi-Fi configuration
esp32/src/Config/WiFiConfig.cpp - Image downloader
esp32/src/Config/ImageDownloader.cpp - Framebuffer drawing
esp32/src/GUI/GUI_Paint.cpp - Font resources
esp32/src/Fonts/font16.cpp - e-Paper controller
esp32/src/e-Paper/EPD_7in3e.cpp - ESP32 SPI and GPIO
esp32/src/Config/DEV_Config.cpp
Other components
- Photo-frame user
- Source image
- Waveshare e-Paper
- Wi-Fi network
Connections 24
- Photo-frame user → Upload UI: uploads photo
README.md - Upload UI → Configured image: stores image
server/server/server.js - Photo-frame user → Configured image: configures source
README.md - Configured image → Image preparation: loads and sizes
README.md - HTTP image API → Image processor: processes image
server/server/server.js - Image preparation → Image processor: prepares canvas
README.md - Image processor → Palette selection: selects colors
server/server/imageProcessor.js - Image processor → Palette dithering: dithers image
server/server/imageProcessor.js - Image processor → Device color mapping: maps device colors
server/server/imageProcessor.js - Palette selection → Palette dithering: provides palette
server/src/dither/dither.ts - HTTP image API → BMP display script: serves BMP
README.md - BMP display script → HTTP image API: fetches BMP
README.md - BMP display script → Waveshare display driver: displays image
python/epd_bmp.py - Waveshare display driver → Pi GPIO and SPI: uses GPIO/SPI
python/lib/waveshare_epd/epd7in3e.py - Waveshare display driver → Waveshare e-Paper: updates panel
README.md - ESP32 firmware → Wi-Fi configuration: configures connection
README.md - ESP32 firmware → Image downloader: retrieves image
README.md - Wi-Fi configuration → Wi-Fi network: joins network
README.md - Image downloader → HTTP image API: requests ESP32 image
README.md - Image downloader → Framebuffer drawing: fills framebuffer
esp32/src/Config/ImageDownloader.cpp - Framebuffer drawing → Font resources: renders text
- Framebuffer drawing → e-Paper controller: supplies image
- e-Paper controller → ESP32 SPI and GPIO: uses SPI/GPIO
- e-Paper controller → Waveshare e-Paper: refreshes panel
README.md