summaryrefslogtreecommitdiff
path: root/content/projects/guitar-hero/index.md
blob: 4603a4b0580cd03af62d967546cef6580d849920 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
---
title: "Guitar Hero"
date: 2023-10-23T23:18:05-04:00
mermaid: true
draft: false
---

One of my University classes tasked me with creating a custom pcb remote as
well as a GUI software that interfaced with it. I decided to create a *Guitar
Hero* clone capable of reading files created for the similar project *Clone
Hero* using C++ and QT.

The goal of this class was to teach Computer Science students about GUI design
as well as teach electrical engineers about PCB design. Both type of students
would also get to learn about software and hardware integration. On the
hardware side, the requirements were quite simple:

- The designed PCB needed to be less then or equal to 10x15cm
- A minimum of 5 switches were needed
- A joystick as well as an accelerometer had to get integrated
- We could choose wether to integrate a 5 segment or a bar graph display

{{<mermaid>}}
classDiagram
    Animal <|-- Duck
    Animal <|-- Fish
    Animal <|-- Zebra
    Animal : +int age
    Animal : +String gender
    Animal: +isMammal()
    Animal: +mate()
    class Duck{
      +String beakColor
      +swim()
      +quack()
    }
    class Fish{
      -int sizeInFeet
      -canEat()
    }
    class Zebra{
      +bool is_wild
      +run()
    }
{{</mermaid>}}

After a little back and forth with our teachers, we came to an agreement that
we could configure some of our switches outside the pcb and mount them directly
to the guitar. This way, the pcb itself could be located at the base of a guitar
and host the strumming mechanism. We also convinced them it would be best for our
usecase to also mount the accelerometer on a guitar shaft and configure it as some
sort of trigger for a bonus streak. In the end, this is what we came up with:

<!-- Integration   https://youtu.be/FKOd6nEcEC8 -->
<!-- Song          https://youtu.be/G2GX4o7dhNY -->
<!-- Accelerometer https://youtu.be/xl-ZMSSMalw -->
<!-- Bar Graph     https://youtu.be/WZeAdRM9tGo -->
<!-- Strumming     https://youtu.be/TxubEPih7yw -->
<!-- Joystick      https://youtu.be/q-Qc5jLBBzU -->
<!-- Demo1         https://youtu.be/c_Gxq5UKYd4 -->
<!-- Demo2         https://youtu.be/69InfsTlqqA -->


On the software side of things, requirements were even more forgiving. All we
needed was to use the QT C++ library without any QML or QSS. It took very
little convincing to get my team on board with the *Guitar Hero* clone idea.


{{< youtubepl PLGcbRdKslprBkKg2NyGtS4AGuB2Ng_22e >}}