====== alphapi ====== {{tag> shack, music, shackoperations}} alphapi ist eine Reimplantation von [[friedhof:alphafluid|alphafluid]] (dem Matematen im hinteren Flur), der auf einem Raspberry Pi läuft. Der alte Quellcode von alphafluid ist [[https://github.com/shackspace/alphafluid | hier zu finden]]. Alle alte Dokumentation ist damit in Teilen obsolet. Der pi ist unter alphapi.shack (10.42.20.20) zu erreichen und man kann sich mit Hilfe eines puppet keys authentifizieren. Dafür muss der Key zwingend auf puppet.shack deployed sein. === add sounds to repo === - git pull https://github.com/shackspace/alphapi/ - Füge Deine samples im Unterordner server/sounds/ hinzu. - git push - Falls dir die Berechtigungen für das pushen der Sounds fehlen, schreibe dem Vorstand eine E-Mail. === pull from alphapi.shack === - ssh -i id_rsa_puppet root@alphapi.shack - su pi - cd - cd alphafluid/alphapi - git pull (ist aber grade kaputt, git ist zu alt) === architecture === Alphapi contains of two parts, an 8bit AVR which handles the 7segment display, PIR and other sensors ( https://github.com/shackspace/alphapi/tree/master/firmware ) and the raspberry pi which interfaces with the AVR via Serial and handles sound + light. == AVR == The Microcontroller sends the following messages: - /o/d/1/ - door opened - /o/b/ - bottle bought at - /o/d/0/ - door closed - /o/p/0/1 - pir spot - /o/p/1/1 - pir room It can receive the following messages: - /i/s/ - shown in 7 segment all messages end with \r\n == RaspberryPi == Code is at https://github.com/shackspace/alphapi/blob/master/server/alphapi.py