Final Project Progress

Finalised Concept for the Project

My final project is a dual-player wheel controlled dance survival game that uses both Arduino and p5.js to create a physically interactive digital experience. A physical wheel attached to a rotary encoder or potentiometer acts as the primary input device. When the player rotates the wheel, the Arduino reads real-time angle data and sends it to p5, which controls the horizontal position of two characters represented by circles inside a circular arena.

Random obstacles fall from the top of the p5 canvas, and the player must rotate the wheel to move both characters and avoid collisions. If either character touches a falling object, the game ends

Arduino Program:

Inputs:

  1. Potentiometer: measures the angle of the physical wheel. Maps the analogue input to degree values.
  2. This value is sent to p5 via Serial.

Outputs:

  1. Red / Green LED- for the disco effect of lights. Activates according to the song beats

P5 Program:

    1. Draw two player circles on the arena perimeter or surface.
    2. Spawn falling objects at random intervals and positions.
    3. Detect collisions between objects and characters.
    4. Read wheel angle data from Arduino
    5. Smoothly rotate the two characters horizontally based on the mapped value.
    6. Track the best score
    7. Play a song in the background and send instructions to Arduino to light up LEDs according to the beats

Leave a Reply