For my final project, I decided to bring my midterm project to life and create controllers for the game characters that I designed. If it’s possible, I would like to make two game pads which two players will have to press physically with their feet, which then controls the two characters on the screen. The game pads would be inspired by the video game Dance Dance Revolution (DDR). In addition to the game pads, I was also thinking about adding sound effects using the beeper when the health decreases in the game, the LCD display to depict some artwork or health bar, or the LEDs to give some feedback to the players. I would like to make use of the woodshop, but if time doesn’t permit this idea, I wouldn’t mind scaling down to use the 3D printers or laser cutters.
Some Code Snippet for the Week
const int UP_BUTTON = 11; const int DOWN_BUTTON = 10; const int RIGHT_BUTTON = 6; const int LEFT_BUTTON = 5; void setup() { // Start serial communication at 9600 baud Serial.begin(9600); // Set button pins as input with internal pull-up resistors pinMode(UP_BUTTON, INPUT_PULLUP); pinMode(DOWN_BUTTON, INPUT_PULLUP); pinMode(RIGHT_BUTTON, INPUT_PULLUP); pinMode(LEFT_BUTTON, INPUT_PULLUP); } void loop() { // Read the state of the UP_BUTTON (HIGH = not pressed, LOW = pressed) int upButtonState = digitalRead(UP_BUTTON); int downButtonState = digitalRead(DOWN_BUTTON); int rightButtonState = digitalRead(RIGHT_BUTTON); int leftButtonState = digitalRead(LEFT_BUTTON); // Print the value (HIGH or LOW) to the Serial Monitor Serial.print(upButtonState); Serial.print(","); Serial.print(downButtonState); Serial.print(","); Serial.print(rightButtonState); Serial.print(","); Serial.println(leftButtonState); }