wok diff python-rpi-pyglow/stuff/pyglow @ rev 16499
Addpython-rpi-pyglow with custom pyglow tool to easily test Pyglow (tested by myself)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Wed Apr 23 19:22:10 2014 +0200 (2014-04-23) |
parents | |
children | bbfc89f2eaa6 |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/python-rpi-pyglow/stuff/pyglow Wed Apr 23 19:22:10 2014 +0200 1.3 @@ -0,0 +1,26 @@ 1.4 +#!/bin/sh 1.5 +# 1.6 +# Tiny wrapper to Python Pyglow examples 1.7 +# 1.8 + 1.9 +ex="/usr/share/pyglow" 1.10 + 1.11 +# Make sure we have i2c-dev module loaded 1.12 +if ! lsmod | fgrep -q 'iec_dev'; then 1.13 + modprobe i2c-dev 1.14 +fi 1.15 + 1.16 +case "$1" in 1.17 + cpu) 1.18 + python ${ex}/cpu.py ;; 1.19 + clock) 1.20 + python ${ex}/clock.py ;; 1.21 + set-leds) 1.22 + python ${ex}/set_leds.py ;; 1.23 + 'test') 1.24 + python ${ex}/test.py ;; 1.25 + *) 1.26 + echo "Usage: $(basename $0) [test|cpu|clock|set-leds]" ;; 1.27 +esac 1.28 + 1.29 +exit 0