Anime Opening Quiz


Intro

For my "Squawk Finale" project I created the Anime Opening Quiz device. This prototype features a speaker, photo-resistor, and a sliced up Cheez-It box supposedly resembling a boombox. The goal for this project was recreate the YouTube anime opening quiz experience that my friends seem to love so much, (*sigh*). This entails playing a random anime opening, then giving the players time to guess which anime it is from. The players will have the ability to pause and skip to the next opening once they have guessed. The resulting product is showcased in this video here:

 


How it works - Arduino

The centerpiece of this project is the mini-speaker. Using the Sunshine demo (a class resource) as a base, I was able combine different rhythm values and pitches to play music through the mini-speaker. I used a random number generator to select an array of music out of the two I programmed. The music will then play until either the song ends, or user input is detected. 

In terms of user input, the players have the option to cover the hole in the center of the "boombox" to pause the music. This action will push the photo-resistor past its threshold, (the photo-resistor is calibrated to the environment when it is first plugged in), thus causing the program to pause and wait for the hole to be covered once more. As shown in the showcase video, covering the hole of the boombox is meant to closely resemble the action of slamming a big red button that would be used in game shows. Slamming the button while the music is paused will skip to the next song.

 

How it works - Unity

The unity program goes hand in hand with the Arduino by revealing the anime the opening is from in the designated time frame. Once again through Ardity, I was able to set up simple serial port communication between the Arduino and Unity. Through the commands "show", "hide", and the name of each anime, I am able to display all of the information the player needs to see. 

Once the Arduino selects a song to play, it will send a message to Unity saying what anime it is from. Unity will then prep the image representing that anime and wait for the time to reveal it. Once the song either ends naturally, or via being skipped, the Arduino will message Unity telling it to reveal the anime. After 4.5 seconds, another message will be sent telling Unity to hide the anime and return to its default state.


Process & Ideas for Optimal Implementation

For this project I knew for sure that I wanted to do something related to playing music out of the Arduino. After running through a few terrible ideas, I eventually decided to make the Anime Opening Quiz device. Unfortunately, I quickly discovered the shortcomings of this technology. Turns out that the mini-speaker is horrible at playing fast songs, especially when playing the same note consecutively. I struggled for a while trying to make the song I had chosen sound remotely correct. After slowing some parts down and inventing a "break system", I was able to bring it to something I was satisfied with (almost). *See my code for more on the break system* Naturally, I chose a relatively slow song for the next opening I implemented. 

If I were to ever expand upon this prototype, I would certainly create a web based program for it. This would allow me to utilize APIs for both music and images. This would essentially give me infinite content to work with at the expense of some more upfront work (definitely worth it through...probably).


Circuit Schematic

Links:

Arduino/Unity Code

Ardity 

Comments

Popular posts from this blog

Red Light Green Light

Punch Buddy