Giter Club home page Giter Club logo

qtproject's Introduction

QtProject

양소영,이상현

0. 개요


Qt와 라즈베리파이를 사용한 간단한 게임 제작

1. 개발 목표


  1. 7개의 디바이스 드라이버를 사용하여 게임 개발
  2. 하나의 디바이스로 다른 디바이스 동작 제어
  3. Qt를 활용하여 GUI 제공
  4. 사용자 이름 저장과 점수

2. 주요 기능


  1. 동작 내용
  • 가상 키보드를 통해 사용자의 이름을 입력
  • 3가지의 게임을 순차적으로 진행
  • 정답 입력 시, 각 게임마다 점수 부여
  • 왼쪽 하단에서 자신의 이름과 점수 확인

2.사용한 디바이스 드라이버와 동작

  • Text LCD : 게임 문제 출력
  • FND : 힌트 출력
  • Dip switch : LED 제어
  • LED : dip switch 입력값 출력
  • Dot : Qt로 값 입력
  • Push switch : step motor 제어
  • Step motor : 값만큼 회전

3. 동작설명


  1. 초기화면에서 EditText를 통해 사용자의 이름을 입력받는다
  2. 두번째 화면에서는 문제1인 TextLCD의 내용을 읽으라는 메세지가 나온다
  3. TextLCD에는 "ReadMessageOnFND ChangeLEDUsingDip"이 출력된다
  4. FND에는 0252가 출력되고 이는 2진수로 11111100(2)로 나타낼 수 있다
  5. 위의 정보를 토대로 Dip스위치를 동작시켜(위는 1,아래는0) 이와 매핑되어있는 LED를 on,off한다
  6. LED가 1~6까지 1, 즉 on이 되었으면 문제1의 정답을 맞춘것으로 왼쪽 하단에 사용자 이름과 함께 점수(30)을 출력한다
  7. 세번째 화면에서는 문제2인 LED의 메세지를 통해 Dot을 제어하라는 메세지가 나온다
  8. Dot은 Qt의 GUI를 사용하여 제어가 가능하고 해당 문제의 정답은 9이기 때문에 dot의 값을 9로 세팅한다
  9. 이또한 정답이기 때문에 왼쪽하단에 점수가 30점이 더해져 총 60점이 출력된다
  10. 네번째 화면은 문제3인 push switch를 사용하라는 메세지와 "공이 오른쪽으로 빨리 회전한다"는 메세지가 나온다
  11. push switch는 step motor를 제어할 수 있도록 매핑되어있기 때문에 이를 동작시킨다
  12. push switch의 1,4,5를 모두 한번씩 누르게 되면 정답이 된다
  13. 마지막 문제는 배점이 40점이였기 때문에 총점 100점으로 끝나게 된다
  • 각각의 화면은 next버튼을 통해 페이지가 넘어가게된다

4. Detail


  • Tool: QtCreator
  • 언어: C++
  • H/W : Raspberry Pi 3 (Achro-EM_kit V1.2)

qtproject's People

Contributors

yangsso51 avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

Forkers

kimkuan

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.