Giter Site home page Giter Site logo

hun-piano's Introduction

음취헌 Piano Manager 🎹

음취헌은 성균관대 자연과학캠퍼스 복지회관 3층에 있는 고전음악 감상실입니다. 주요 활동으로는 그랜드피아노 자유 이용, 주 2시간 내외의 운영, 매년 연주회 및 홈커밍데이 등 여러 행사가 있습니다. 교내 구성원이라면 누구든 가입할 수 있으며, 실원은 상시 모집 중입니다. 관련 문의 사항은 운영진에게 연락 바랍니다.

이 repository는 음취헌 피아노 사용 기록용 프로그램입니다. 그랜드 피아노 이용 시 사용 기록을 데이터베이스에 기록하며, 이를 웹페이지를 통해 접근할 수 있도록 하는 것이 저희의 목표입니다. 원하는 기능이 있다면 제작진(아래 contributors)에게 메일 등으로 문의하거나, issue로 등록하면 됩니다.

이 repository는 Raspberry Pi를 위해 만들어졌으며, 주된 기능은 다음과 같습니다.

  • 전화번호 혹은 NFC를 이용한 사용시간 체크
  • 사용시간을 DB에 기록 (현재 aws 사용 중)

✔ Guideline

Setting ⚙

해당 repository를 다운로드 받으세요. git을 이용해 받는 것을 권장합니다.
git을 이용해서 받으려면, 우선 git을 설치하고 원하는 경로에서 다음 명령어를 입력하세요.

$ git clone https://github.com/dotoleeoak/skku-hun-2020

파일을 모두 받았으면, 제작진(@dotoleeoak)에게 db.py를 받아 model 폴더에 넣어주세요.
(해당 파일은 보안의 문제로 GitHub에 업로드하지 않았습니다.)

Font

font 폴더에 있는 배달의민족 주아 글꼴을 설치해주세요.

Python

이 프로그램은 Python3으로 동작합니다. Python3을 설치해주세요.
설치 후, 이 폴더를 열고 가상환경을 만들어주세요. (skku-hun-2020 하위 폴더로 생성하세요)

(Windows)
$ python -m venv hun

(macOS / Linux)
$ python3 -m venv hun

그 다음 가상환경을 활성화하고 필요한 패키지를 받아주세요.

(Windows cmd)
$ hun\Scripts\activate.bat
$ pip install -r requirements.txt

(Windows Powershell)
$ hun\Scripts\Activate.ps1
$ pip install -r requirements.txt

(macOS / Linux)
$ source hun/bin/activate
$ pip3 install -r requirements.txt

Run

가상환경이 활성화된 상태에서 Python으로 main.py를 실행하면 됩니다.

(Windows)
$ python main.py

(macOS / Linux)
$ python3 main.py

Raspberry Pi & Pins 🔌

Raspberry Pi Setting

디스플레이의 번인과 전력 소모를 방지하기 위해 화면이 자동으로 꺼지는 시간을 1분으로 설정합니다.

$ sudo vi /etc/lightdm/lightdm.conf

를 (또는 원하시는 다른 에디터로) 실행한 후, #xserver-command=xserver-command=X -s 1 dpms 변경해줍니다.

Pins

핀 번호에 대한 정보는 여기에서 확인하세요.

  • For Raspberry Pi Touch Screen
Name Pin # Pin name
5V 2 5V
GND 9 Ground
  • For Rasberry Pi Case with Cooler
Name Pin # Pin name
5V 4 5V
GND 6 Ground
  • For NFC Module(RFID-RC522)
Name Pin # Pin name
SDA 24 GPIO8
SCK 23 GPIO11
MOSI 19 GPIO10
MISO 21 GPIO9
IRQ None None
GND 20 Ground
RST 22 GPIO25
3.3V 17 3V3

NFC 관련 주의 사항 ⚠

Raspberry Pi가 아닌 환경에서 개발 및 디버깅 시

NFCReader() 클래스 생성 코드를 다음과 같이 바꿔주세요.

self.nfc_reader = NFCReader(debug=True)

😎 Contributors


내용 추가 예정

hun-piano's People

Contributors

dotoleeoak avatar threedalpeng avatar hopanglee avatar

Stargazers

Jaekwang Shin avatar  avatar Kangmin Seo avatar 김주현 avatar  avatar

Watchers

 avatar  avatar 김주현 avatar

hun-piano's Issues

실행 경로 생성

다음 두 가지 경우 중 하나 이상 선택

  1. 시스템 쉘스크립트를 수정하여 라즈베리 파이 구동 시 자동 실행

  2. 쉘스크립트를 생성하여 바탕화면에서 바로 실행

Make setup.py

각종 모듈 설치, 설정값 세팅 등
setup.py에서 해결

Fix Module Hierarchy

model / controller 역할 구분 불분명함
=> 현재 상태보다 controller 비중 늘려야할 것으로 보임

  • model 내 module 명 수정 (view와 구분되도록)

Unit test

코드 배포 전 testing 환경 구성
(maybe pytest)

Dialog 추가 & 각종 예외 처리

  • 가입(Sign Up) 시 입력 올바르지 않은 경우 => 경고
  • 사용 (In Use) 종료 시 확인 메시지

추가사항 있으면 댓글로 달 것

README - guideline 추가

  • 가상 환경 및 requirements.txt 세팅 방법 (Makefile...?)
  • 폰트 설치 (배달의민족 주아)

Path representation

문제

현재 파일 경로 pathlib.Path로 표현
stylesheet에서 image: url()에 posix representation 필요 (windows 한정)

해결책 1

path.as_posix() 사용
이것보다 더 좋은 해결책은 없을까...?

해결책 2

QUrl 사용 (Qt 내장 클래스)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.