I successfully integrated Arduino and p5js to create most of my project. Initially, I created the game on p5js and used keyboard input. Later, I modified the program to accept input from an Arduino flex sensor, which worked seamlessly.
Moeez tested the game without any instructions from me and found it to be smooth and playable. However, he had some confusion regarding the direction to tilt the flex sensor as the value of the sensor differs for each direction. Once I provided him with the correct direction, the game felt even smoother. Although the flex sensor was not in a fixed position during testing, it will be attached to a glove in the final version. This will ensure that the sensor is always in the correct position and can only be bent in one direction (towards the user’s clenched fist).
Currently, the game dynamics are working well and are quite smooth and playable. I have also designed a cover page for the as posted below:
However, I still need to add functionality that responds to feedback from p5js by using two LEDs: a green LED for successful bridge crossing and a red LED for failure. I also plan to fix the flex sensor into the glove to provide a better gaming experience.
Although I needed to provide instructions to Moeez regarding the direction to tilt the flex sensor during testing, this will be resolved once the sensor is fixed to the glove. Additionally, I have already added an instruction page to make the game easier to understand. Overall, the game is simple to play and requires minimal attention to instructions. Anyone can quickly learn to play and enjoy the game.