Controller Description:
Our controller is for the game “Sort the Court”. In this game, players take the role of a king listening to the requests of their many subjects and subordinates. To respond to the requests, the player must press either the “Y” or “N” keys for the “Yes” and “No” replies respectively. Our controller connects to the setting of this game through being a literal crown the player must wear upon their head to immerse them in their role as the king. In order to play the game with it, the player must answer the question by physically moving their head. An up and down nod will be received as a “Yes” response, while a side to side motion will be read as a “No” response. There will be a bit of visual feedback on the controller through the Circuit Playground Express’s neopixels. The board itself will be placed inside a gem on the front of the crown. When the motion input is detected, the neopixels will light up in response to the player’s choice. A “Yes” will result in the neopixels lighting up green, while a “No” will light up all of the neopixels red.
Controller Sketch:
Controller Schematic:
Pseudo Code:
Create float variable which stores Z rotation value
Create float variable which stores X rotation value
Setup
Serial begin function
Circuit Playground begin function
Delay 1000
Loop
Set Z rotation variable
Set X rotation variable
Clear circuit playground pixel colors
If Z value is not between the set starting position range
Enter Y key on keyboard once
Fill all pixel colors with green
Delay 2000
If X value is not between the set starting position range
Enter N key on keyboard once
Fill all pixel colors with red
Delay 2000


No comments:
Post a Comment
Note: Only a member of this blog may post a comment.