Concept
As a final project for my course, I settled on implementing the popular game Stick Hero, but with a twist. I plan to incorporate a flex sensor connected to the Arduino board to determine the length of the stick, and serial communication between p5Js and Arduino to create a unique gaming experience.
P5Js
The game will be played on the p5Js console. The user will have to press a button to start the game. A stick figure will then appear on the console, and the user will be required to build a bridge by extending the stick. The length of the stick will be determined by the flex sensor connected to the Arduino board. The user will have to extend the stick to the correct length to cross the gap successfully. If the stick is too short or too long, the stick figure will fall, and the game will end.
Arduino
The Arduino board will handle the input from the flex sensor, and the data will be sent to the p5Js console using serial communication. Arduino will also be responsible for playing sound effects. When the stick is extended correctly, a good sound will be played, while a bad sound will be played if the stick figure falls.