For my final project, I am designing a physically interactive dual-player dance survival game that integrates both Arduino and p5.js.
At the core of the interaction is a physical wheel connected to an Arduino. As the player rotates the wheel, the Arduino continuously reads the wheel’s angular direction using potentiometer (not sure). This sensing becomes the “listening” component of the system. The Arduino then sends this data to p5.js, where it controls the movement of a circle containing two characters.
In the p5 sketch, objects fall randomly from the top of the screen, and the player must rotate the wheel to shift the characters left or right, dodging the falling obstacles. The challenge increases because the wheel controls both characters simultaneously: if either one is hit, the game ends. This creates a dynamic where the player must keep track of two positions at once.
Furthermore, to communicate from p5 to Arduino I plan on lighting a green LED light everytime the player successfully dodges obstacle and red light for when game is over.