User Tools

Site Tools


private:writeups:photobox

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
private:writeups:photobox [2020/12/26 18:14]
admin
private:writeups:photobox [2021/01/01 15:32] (current)
admin
Line 1: Line 1:
  
 +The directions here are what I followed to turn my raspberry pi and 7" pi screen into a photobox.
  
-from [[https://access.redhat.com/solutions/448263|here]] edit +**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 [[https://www.instructables.com/Raspberry-Pi-Touchscreen-Setup/|here]] to setup the screen 
 + 
 +**Step 3 - Mount network drive on Pi** 
 + 
 +As discussed [[https://access.redhat.com/solutions/448263|here]] edit 
   /etc/fstab,    /etc/fstab, 
 add the line: add the line:
Line 7: Line 18:
 note that _netdev is needed for network shares. note that _netdev is needed for network shares.
  
-also, i followed the instructions here [[https://askubuntu.com/questions/1081601/how-to-fix-fstab-samba-mounts-not-loading|here]] but added a pause 30 line before the mount -a.  +also, i followed the instructions here [[https://askubuntu.com/questions/1081601/how-to-fix-fstab-samba-mounts-not-loading|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 [[https://www.raspberrypi.org/forums/viewtopic.php?t=199320|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 [[https://learn.sparkfun.com/tutorials/how-to-run-a-raspberry-pi-program-on-startup/method-2-autostart|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 5 - 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).   
 + 
 + 
 +**Step 6 - Enable right click as a long click ** 
 + 
 +Modifying the directions from [[https://fmirkes.github.io/articles/20190827.html|here]], run the commands 
 + 
 +   sudo apt install build-essential libevdev2 libevdev-dev 
 +   git clone 'https://github.com/PeterCxy/evdev-right-click-emulation.git' 
 +   cd 'evdev-right-click-emulation' 
 +   make all 
 +   sudo cp 'out/evdev-rce' '/usr/local/bin/' 
 +   sudo chmod +x '/usr/local/bin/evdev-rce' 
 +    
 +Then navigate to ~/.config/autostart, create the file: evdev-rce.desktop, and fill it with 
 +   [Desktop Entry] 
 +   Version=1.0 
 +   Type=Application 
 +   Name=evdev-rce 
 +   GenericName=Enable long-press-to-right-click gesture 
 +   Exec=sudo /usr/local/bin/evdev-rce 
 +   Terminal=true 
 +   StartupNotify=false 
private/writeups/photobox.1609006454.txt.gz · Last modified: 2020/12/26 18:14 by admin