09 March 2025

Team 2: Progress Review

Description of controller: The shape of the controller is based off of a Japanese Spring Onion, or Japanese Leek. A peripheral of the controller is a board with 4 colors on it; red, yellow, green and blue. 

Mechanics of it's operation: The leek part of the controller uses a color sensor at the end of it to detect what color it is currently pointed at on the board to determine what input it should send to the computer. Red being left, blue is right, green is up, and yellow is down. A multicolor LED inside of the controller changes colors depending on the color it is currently seeing, sending both feedback and being visually fun. It connects to the pc via USB A, and USB C to the arduino.

Conceptual Relationship with the game: The game, named Project Diva, stars a cast of animated characters who are collectively known as Vocaloid. The face of Vocaloid is named Miku Hatsune, the green haired twin pigtails girl. In the early 2000s, the fandom came up with their own ideas about the characters personalities, and one was a chosen food they all like. Miku's is a leek. The company that had created the Vocaloids, yamaha, accepted and embraced the fandom's enthusiasm and made it canonical to her. So the controller is based off of the idea that a leek both symbolizes Miku, the face of the game, and her favorite food. It lighting up, changing colors, and being waved around is also a reference to the glow sticks that are handed out at concerts held for Vocaloid, usually in the shape of a leek, that are waved around to the beat of the song being sung. 



   


/*
Howard De Ausen and Gary Hazelgren
Project Diva alternate controller
Functions include arrow keys
Using Arduino Leonardo with TCS3200 color sensor

Still figuring out LEDS. May need to use protoboards.
*/


#include <Keyboard.h>

// Sensor pins
#define S0 2
#define S1 3
#define S2 4
#define S3 5
#define OUT 6

void setup()
 {
  // Configure color sensor pins as input/output
    Serial.begin(9600); //Serial Monitor
    pinMode(S0, OUTPUT);
    pinMode(S1, OUTPUT);
    pinMode(S2, OUTPUT);
    pinMode(S3, OUTPUT);
    pinMode(OUT, INPUT);
   
    digitalWrite(S0, HIGH);  // Frequency Scaling
    digitalWrite(S1, HIGH);

    Keyboard.begin();  // Keyboard Emulation
}

void loop()
 {
  // Read color from TCS3200 sensor
  // Determine detected color  
    int color = readColor();  // Reads the color

    if (color == RED) {
        Keyboard.press(KEY_LEFT_ARROW);
    } else if (color == BLUE) {
        Keyboard.press(KEY_RIGHT_ARROW);
    } else if (color == GREEN) {
        Keyboard.press(KEY_UP_ARROW);
    } else if (color == YELLOW) {
        Keyboard.press(KEY_DOWN_ARROW);
    } else {
        Keyboard.releaseAll();  // Releases key if no color shown
    }

    //Place Holder for Delay Function
}

int readColor() // Function to read and determine color from TCS3200 sensor
{

}




No comments:

Post a Comment

Note: Only a member of this blog may post a comment.