-
Notifications
You must be signed in to change notification settings - Fork 6
/
i2c2oled_slideshow.sh
55 lines (41 loc) · 1.36 KB
/
i2c2oled_slideshow.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/bash
#
# File: "/media/fat/i2c2oled/i2c2oled_slideshow.sh"
#
# Just for fun ;-)
#
# 2021-05-03 by venice
# License GPL v3
#
# Simple Slidehow Player for all availble PIX files
#
# Load INI files
. /media/fat/i2c2oled/i2c2oled-system.ini
. /media/fat/i2c2oled/i2c2oled-user.ini
# Enable Debugging in User INI File
debugfile="/tmp/i2c2oled_slideshow"
# ************************** Main Program **********************************
if [ -z "$1" ]; then
# Stopping the deamon
/media/fat/i2c2oled/S60i2c2oled stop
init_display # Send INIT Commands
clearscreen # Fill the Screen completly
set_cursor 8 3 # Set Cursor at Page (Row) 2 to the 16th Pixel (Column)
showtext "PIX Slideshow" # Some Text for the Display
sleep ${SLIDETIME} # Wait a moment
for pixpic in ${pixpath}/*.${pixextn}; do # Get Picture
echo "Showing: ${pixpic}" # Some output
source "${pixpic}" # Load Picture
sendpix # ...and show it.
sleep ${SLIDETIME}
done
# Starting the deamon
/media/fat/i2c2oled/S60i2c2oled start
else
# Just show one PIX
echo "Showing: ${1}" # Just show one picture if given with full path via command line parameter
source "${1}" # Load Picture
sendpix # ..and show it.
#sleep 3
fi
# ************************** End Main Program *******************************