User Tools

Site Tools


private:writeups:photobox

This is an old revision of the document!


The directions here are what I followed to turn my raspberry pi and 7“ pi screen into a photobox.

Step 1 - Setup

Install Raspiberry pi OS (full) onto an SD card and install in your Pi. Bootup, run raspi-config, and get everything setup the way you like it.

Step 2 - Screen

Follow directions here to setup the screen

Step 3 - Mount network drive on Pi

As discussed here edit

/etc/fstab, 

add the line:

//192.168.1.110/public/photos   /diskstation_share   cifs  _netdev,username=guest,password=,dir_mode=0755,file_mode=0755,uid=500,gid=500 0 0

note that _netdev is needed for network shares.

also, i followed the instructions here here and created the file

/etc/network/if-up.d/fstab

with the lines

#!/bin/sh
sleep 30
sudo mount -a

Note that the sleep command is a hack that allowed the Pi to settle its network connectivity before it attempted to mount the network folder

Step 4 - Slide viewer

following the directions here, I created the file runslideshow.sh on the ~/Desktop with the following lines

#!/bin/sh
cd /home/pi/diskstation_share
feh -Z -z -F -D 300 --hide-pointer --auto-rotate --recursive

Note that the recursive allows the directories to be searched recursively.

To make sure it autostarted correctly, I followed the directions here and created a .desktop file at /home/pi/.config/autostart that contains

[Desktop Entry]
Type=Application
Name=runslideshow
Exec=/home/pi/Desktop/./runslideshow.sh

Step 4 - Schedule screen dimming

To schedule screen dimming, open the scheduler with

 crontab -e

and add the following lines

 0 7 * * * sudo sh -c "echo 255 > /sys/devices/platform/rpi_backlight/backlight/rpi_backlight/brightness"
 0 21 * * * sudo sh -c "echo 12 > /sys/devices/platform/rpi_backlight/backlight/rpi_backlight/brightness"

which brightens the screen at 7:00 and dims the screen at 21:00. Note that 255 is max brightness and 0 is minimum (off).

private/writeups/photobox.1609419472.txt.gz · Last modified: 2020/12/31 12:57 by admin