diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..853ee63 --- /dev/null +++ b/.gitignore @@ -0,0 +1,26 @@ +# For PCBs designed using KiCad: http://www.kicad-pcb.org/ +# Format documentation: http://kicad-pcb.org/help/file-formats/ + +# Temporary files +*.000 +*.bak +*.bck +*.kicad_pcb-bak +*.sch-bak +*~ +_autosave-* +*.tmp +*-save.pro +*-save.kicad_pcb +fp-info-cache + +# Netlist files (exported from Eeschema) +*.net + +# Autorouter files (exported from Pcbnew) +*.dsn +*.ses + +# Exported BOM files +*.xml +*.csv diff --git a/Pi/ogg/A3v16.ogg b/Pi/ogg/A3v16.ogg new file mode 100644 index 0000000..1edf1a5 Binary files /dev/null and b/Pi/ogg/A3v16.ogg differ diff --git a/Pi/ogg/C3v16.ogg b/Pi/ogg/C3v16.ogg new file mode 100644 index 0000000..93e3bd9 Binary files /dev/null and b/Pi/ogg/C3v16.ogg differ diff --git a/Pi/ogg/F#3v16.ogg b/Pi/ogg/F#3v16.ogg new file mode 100644 index 0000000..020dad8 Binary files /dev/null and b/Pi/ogg/F#3v16.ogg differ diff --git a/Pi/s.py b/Pi/s.py new file mode 100644 index 0000000..6ea952d --- /dev/null +++ b/Pi/s.py @@ -0,0 +1,33 @@ +#!/usr/bin/python3 + +import serial +import pygame + +pygame.mixer.pre_init(buffer=32) +pygame.init() +pygame.mixer.quit() +pygame.mixer.init(buffer=32) + +SoundC = pygame.mixer.Sound('ogg/C3v16.ogg') +SoundA = pygame.mixer.Sound('ogg/A3v16.ogg') +SoundFF = pygame.mixer.Sound('ogg/F#3v16.ogg') + +# port = serial.Serial("/dev/ttyS0", baudrate=115200, timeout=.001) +port = serial.Serial("/dev/ttyS0", baudrate=115200) + +while True: + # rcv decodieren + rcv = port.read() + + if rcv[0] & ( 1 << 1 ) : + SoundC.stop() + SoundC.play() + else: + SoundC.stop() + + if rcv[0] & ( 1 << 2 ) : + SoundA.stop() + SoundA.play() + else: + SoundA.stop() +