slitaz-arm rev 172
Add support for 8x8 leds exampe in pileds
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sun May 04 22:25:37 2014 +0200 (2014-05-04) |
parents | 6db0c7f6fd10 |
children | 48a8666c6207 |
files | rpi/pileds |
line diff
1.1 --- a/rpi/pileds Sun May 04 20:35:14 2014 +0100 1.2 +++ b/rpi/pileds Sun May 04 22:25:37 2014 +0200 1.3 @@ -14,10 +14,10 @@ 1.4 $(boldify "Commands:") 1.5 act Turn on/off the on board ACT green led 1.6 7-clock Adafruit 7-segment LED Backpack clock example 1.7 + 8x8 Adafruit 8x8 LED Matrix Backpack example 1.8 ada-clean Clean: Adafruit 7-segment or 8x8 Matrix 1.9 1.10 EOT 1.11 -#8x8 Adafruit 8x8 LED Matrix Backpack example 1.12 } 1.13 1.14 load_modules() { 1.15 @@ -43,6 +43,7 @@ 1.16 status="$(cat $brightness)" 1.17 [ "$quiet" ] || gettext "Current status:"; echo " '$status'" 1.18 if [ "$status" == 0 ]; then 1.19 + echo "0" > ${brightness}; usleep 50000 1.20 echo "1" > ${brightness} 1.21 else 1.22 echo "0" > ${brightness} 1.23 @@ -60,9 +61,13 @@ 1.24 1.25 8x8) 1.26 scripts="/usr/share/adafruit/LEDBackpack" 1.27 - #load_modules 1.28 - #check_packages "python-rpi-adafruit" 1.29 - echo "TODO: $scripts" ;; 1.30 + load_modules 1.31 + check_packages "python-rpi-adafruit" 1.32 + if [ -f "${scripts}/ex_7segment_clock.py" ]; then 1.33 + python ${scripts}/ex_8x8_pixels.py 1.34 + else 1.35 + gettext "Missing:"; echo " ${scripts}/ex_8x8_pixels.py" 1.36 + fi ;; 1.37 1.38 ada-clean) 1.39 adafruit_clean ;;