Skip to content

Waveshare 7.5" e-paper display with Raspberry Pi Zero and Firebase Real Time Database to remotely upload images/text to an e-paper display.

Notifications You must be signed in to change notification settings

adrian-patterson/love-box

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

love-box

  • A remotely controllable e-paper display using waveshare's 7.5" e-paper display, a Raspberry Pi Zero W, and Firebase's free-tier real-time database
  • A gift meant for leaving meaningful notes/messages for someone you love

Repository Structure

/Api

  • Contains a simple flask API to serve requests for updating the message/picture for the display
  • message.py serves as a class representing the database objects
  • message_repository.py serves as a repository for fetching and updating database values
  • api.py serves requests for updating or previewing messages/images from the UI (in the following section)

/LoveBoxUi

  • Contains a React application for easily changing the display picture
  • The look: image
  • Or on mobile:

image

  • The UI allows:
    • Viewing the picture gallery, choose a picture and upload. Pictures are shuffled by default and can be reshuffled
    • Selecting a font size and uploading a message (send button used for uploading)
    • Selecting a font size and previewing where line breaks will be in message (with left preview button)

/RpiUpdateService

  • Update service hosted on the raspberry Pi Zero W which controls the display
  • Python script which is run every 10 minutes to check database contents and update display accordingly
  • Script is called using a cronjob

/ShellScripts

  • auto_update.sh
    • Called every 24 hours using a cronjob to update raspberry pi with remote code
  • update_display.sh
    • Called every 10 minutes using a cronjob to update the display with database contents
  • install.sh
    • Installs needed dependencies for the raspberry pi

/src

  • update_display.py updates the display itself with the contents within the database
    • The time stored within the database is compared with the current time
    • If the database was last updated in the previous 10 minutes, then the display is changed
  • format_images.py script allows one to drop JPEG images into the /pic library, and then transforms them to the dimensions required by the display (800x480)
    • These images are also saved to the /public directory for the react app to be displayed on the website
  • message.py and message_repository.py are the same as found in the API
  • /lib
    • All waveshare libraries - These are taken right from the waveshare/e-paper repo - Contains a c shared library and python example for writing to the 7.5" display
  • /pic
    • Where pictures are stored and read from
  • /font
    • Stores font for display

Crontab Entries

  • */10 * * * * /home/pi/projects/love-box/RpiUpdateService/ShellScripts/update_display.sh >> /home/pi/logs/update_display_log.txt 2>&1
    • Ran every 10 minutes
  • 0 0 * * * /home/pi/projects/love-box/RpiUpdateService/ShellScripts/auto_update.sh >> /home/pi/logs/git_log.txt 2>&1
    • Ran once a day
  • Keep in mind that these paths are relative and will have to be adjusted based on where the repository files are stored on the raspberry pi

Part List

  • Waveshare E-Paper 7.5" Display
  • Simple 7"x5.5" picture frame
  • Raspberry Pi Zero W
  • 3D printed case to hold raspberry pi and waveshare pi hat
  • USB power supply for the pi

Final Results

Displaying a Picture

image

Displaying Text

image

The Wiring

image image

The Case Designed for the Pi + Waveshare Pi-HAT

image image image

About

Waveshare 7.5" e-paper display with Raspberry Pi Zero and Firebase Real Time Database to remotely upload images/text to an e-paper display.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published