/ Pi_Matrix_Cube / cycle.sh
cycle.sh
1 #!/bin/sh 2 3 # Fades/cycles the globe program through different scenes 4 5 # Show all files in the maps directory in alphabetical order 6 FILES=maps/*.jpg 7 # If you'd prefer a subset of files, different order or location, 8 # you can instead make a list of filenames, e.g.: 9 # FILES=" 10 # maps/earth.jpg 11 # maps/moon.jpg 12 # maps/jupiter.jpg 13 # " 14 15 # Flags passed to globe program each time. 16 # --led-pwm-bits=9 because long chain is otherwise flickery (default is 11) 17 # -a 3 for 3x3 antialiasing (use 2 or 1 for slower Pi) 18 # -t 6 is run time in seconds before exiting 19 # -f 1 fades in/out for 1 second at either end 20 # Can add "-p" to this list if you want poles at cube vertices, 21 # or --led-rgb-sequence="BRG" with certain RGB matrices, etc. 22 set -- --led-pwm-bits=9 -a 3 -t 6 -f 1 23 24 while true; do 25 for f in $FILES; do 26 ./globe $@ -i $f 27 done 28 done