diff --git a/code/piplayer2.py b/code/piplayer2.py new file mode 100644 index 0000000..cb0529e --- /dev/null +++ b/code/piplayer2.py @@ -0,0 +1,31 @@ +# piplayer2 +# http://www.tilman.de/piplayer2 + + +import RPi.GPIO as GPIO +import time + +# photo sensor on PIN 17 +GPIO.setmode(GPIO.BCM) +GPIO.setup(17, GPIO.IN) + +# LED on PIN 27 +GPIO.setup(27, GPIO.OUT) +GPIO.output(27, GPIO.LOW) + +try: + print('Start sensor test') + + while True: + time.sleep(0.25) + if (GPIO.input(17) == GPIO.LOW): + print('LOW') + GPIO.output(27, GPIO.LOW) + else: + print('HIGH') + GPIO.output(27, GPIO.HIGH) + +except KeyboardInterrupt: + print('bye') + GPIO.cleanup() + diff --git a/code/sounds/error.mp3 b/code/sounds/error.mp3 new file mode 100644 index 0000000..56169b7 Binary files /dev/null and b/code/sounds/error.mp3 differ diff --git a/code/sounds/fail.mp3 b/code/sounds/fail.mp3 new file mode 100644 index 0000000..526b731 Binary files /dev/null and b/code/sounds/fail.mp3 differ diff --git a/code/sounds/ok.mp3 b/code/sounds/ok.mp3 new file mode 100644 index 0000000..a19e85e Binary files /dev/null and b/code/sounds/ok.mp3 differ diff --git a/code/sounds/scanning.mp3 b/code/sounds/scanning.mp3 new file mode 100644 index 0000000..0764345 Binary files /dev/null and b/code/sounds/scanning.mp3 differ diff --git a/misc/electronics-final.fzz b/misc/electronics-final.fzz index d4a15a8..e140679 100644 Binary files a/misc/electronics-final.fzz and b/misc/electronics-final.fzz differ