Raspberry Pi Picture Frame

My digital picture frame passed on to its reward and I was very dissapointed in the available options on the market. The resolutions seemed terrible and they were all 16:9 aspect ratio. As is typical no days, most also wanted to connect to some cloud service to get their pictures as well, although they would read an SD card too.

I had my first LCD monitor still, actually one of a pair as I’d given away the other years before. It is a 15” 1024x768 but excellent (for 2002) color and contrast. I also had an original Pi that I paid a friend 0.2 BTC for back when Bitcoin was $100 that was collecting dust. So, I put things together by making a VESA mount case out of some epoxy-filled oak I had lying around as well:

Unassembled Case

Detail of Case

Back View

Front View

Materials

Programming

I wanted to only power the monitor from 7:00 am to 5:00 pm when I’m in my office to see it. Conveniently, there is a Pi command to have the video core put the monitor into standby mode which consumes less than 1W. I wrote a simple BASH script to show a random image from a folder every 4 hours and put it in a cron job that runs every minute. Not terribly efficient but the Pi doesn’t have anything else to do.

#!/bin/bash

hour=$( date +"%H" )
if [ $hour -ge 19 ] || [ $hour -le 7 ] ; then
        killall -q fbi
        vcgencmd display_power 0 > /dev/null
elif ! pgrep -x fbi > /dev/null  ; then
        vcgencmd display_power 1 > /dev/null
        killall -q fbi
        images=$( ls -d /home/pi/frame/images/* )
        fbi -a --noverbose -T 1 -t 14400 -u -1 $images > /dev/null
fi