wok-next annotate python-rpi-pyglow/stuff/pyglow @ rev 16511

Improve pyglow support
author Christophe Lincoln <pankso@slitaz.org>
date Thu Apr 24 20:43:02 2014 +0200 (2014-04-24)
parents bbfc89f2eaa6
children c03f2c599ef4
rev   line source
pankso@16499 1 #!/bin/sh
pankso@16499 2 #
pankso@16511 3 # Tiny wrapper to Python Pimorini (vortex.py) and Pyglow examples
pankso@16499 4 #
pankso@16499 5
pankso@16499 6 ex="/usr/share/pyglow"
pankso@16499 7
pankso@16499 8 # Make sure we have i2c-dev module loaded
pankso@16502 9 if ! lsmod | fgrep -q 'i2c_dev'; then
pankso@16499 10 modprobe i2c-dev
pankso@16499 11 fi
pankso@16499 12
pankso@16499 13 case "$1" in
pankso@16511 14 'test')
pankso@16511 15 python ${ex}/test.py ;;
pankso@16499 16 cpu)
pankso@16499 17 python ${ex}/cpu.py ;;
pankso@16499 18 clock)
pankso@16499 19 python ${ex}/clock.py ;;
pankso@16499 20 set-leds)
pankso@16499 21 python ${ex}/set_leds.py ;;
pankso@16511 22 vortex)
pankso@16511 23 python ${ex}/vortex.py ;;
pankso@16499 24 *)
pankso@16511 25 echo "Usage: $(basename $0) [test|cpu|clock|set-leds|vortex]" ;;
pankso@16499 26 esac
pankso@16499 27
pankso@16499 28 exit 0