Screamer

Team Members

Brennon Farmer, Carter Montgomery, William Rose

Project Overview

The purpose of the project is to allow two people to play a game by screaming into two microphones. Based on the loudness of each player's voice, individual LEDs of a LED strip will be turned on. The color of the LED depends on which player's voice caused the LED to turn on. The player that turns on the most LEDS in a certain time limit or turns on all the LEDs will be the victor. Two microphones will be used to record the audio and convert to an analog value for the two players' voices.

An LCD screen will be used to display a menu for the game. The menu includes a settings option which allows one to change the number of rounds in the game. A high score option is also available which shows the top 10 high scores of the game that are stored on a SD card. Furthermore, the menu can pause and start the game. A nav switch is used to control a blinking cursor which helps in navigating through the menu options. Additionally, a speaker is used to play music while the players are in the menu screen.

A time bar is implemented in the game which shows how much time is remaining for each round. A potentiometer is used to scale the size of the cursor for selecting menu options.

Schematic

https://os.mbed.com/media/uploads/bfarmer/schematicledstrip600.png https://os.mbed.com/media/uploads/bfarmer/topview.jpg

Demonstration Video

https://os.mbed.com/media/uploads/bfarmer/hardware_circuit.png

Image of Player 1 winning https://os.mbed.com/media/uploads/bfarmer/player1_wining.jpg

PowerPoint Presentation

Images of UI

The screens for each state of the game from left to right: Menu, Highscores,Settings,Play,Pause, Results of a Round, and Results of Game

Instructions

Note:The up and down position allows you to move the cursor up and down through the menu options. The middle button allows you to select the option. Note: SD card and microSD card breakout board must be setup or program will not run.

  1. Follow schematic and build the layout.
  2. Compile program located on this site and download the file onto the mbed. A menu screen will appear.
  3. Move the cursor through the menu options by moving the navigation switch’s stick up and down.
  4. Navigate to the “Play” option and press the nav switch’s middle button to select the option.
  5. Each player moves close to their respective microphone and yell into their microphone.
  6. Each player continues to yell into their microphone until the time limit expires or a player causes all the LEDs to turn to the color associated with the player.
  7. After either condition is fulfilled, a game over screen will appear showing who won. If a high score was achieved, it will be saved to the SD card.
  8. Navigate pass the game over screen by pressing the middle button of the Nav switch. The menu screen will appear again.

Additional Features: Pause or Quit the Game while playing

  1. While on the “Play” screen, use the nav switch to navigate to the “Pause” button. Press the nav switch’s middle button to pause the game and display two options.
  2. Move the cursor to either “Continue” or “Quit” and press the middle button of the nav switch to either resume or quit the game, respectively.

Additional Features: Settings

  1. On the menu screen, navigate to the “Settings” option.
  2. Move the cursor and select the number of rounds to be played.
  3. Exit by navigating to the “Back” option and press the middle button of the Nav Switch.

Additional Features: High Scores

  1. On the menu screen, navigate to the “High Scores” option.
  2. The High Scores of the game will be shown.
  3. Exit by navigating to the “Back” option and pressing the middle button of the Nav Switch.

Additional Features: Single Player or Multiplayer

  1. On the menu screen, navigate to the “Settings” option.
  2. Move the cursor below the "Ghoose how many players:" setion.
  3. Select either option "1" or "2" for single player or multiplayer respectively.
  4. Exit by navigating to the “Back” option and pressing the middle button of the Nav Switch.
  1. Change cursor size by turning the potentiometer.

Additional Features: Changing cursor size

  1. Change cursor size by turning the potentiometer.

Parts Used

uLCD-144-G2

https://os.mbed.com/media/uploads/4180_1/8185.png

mbeduLCD HeaderuLCD cable
5V=VU5V5V
GndGndGnd
TX=P28RXTX
RX=P27TXRX
P30ResetReset

Speaker and audio amp

https://os.mbed.com/media/uploads/4180_1/pcbspeaker.jpg https://os.mbed.com/media/uploads/4180_1/_scaled_classdbreakout.jpg

mbedTPA2005D1Speaker
gndpwr- (gnd), in -
p18 (any PWM or D/A)in +
out ++
out --

LEDs

https://os.mbed.com/media/uploads/bfarmer/led-polarity.png

mbedLED
Any PwmOut pin (p21 -p26)+
GND-

Microphone

https://os.mbed.com/media/uploads/4180_1/adamicrophone.jpg

mbedmicrophone(optional) 10uf decoupling capacitor
gndgnd-
VU (+5VDC)Vin+
p15 (AnalogIn)DC

LED strip (DotStar) and APA

https://os.mbed.com/media/uploads/okini3939/dotstar.jpg https://os.mbed.com/media/uploads/okini3939/apa102.jpg

mbedLED Strip
Vu+5V
P5 (MOSI)DI
P7 (SCK)CI
GNDGND

Nav Switch

https://os.mbed.com/media/uploads/4180_1/tacbb.jpg

mbed LPC1768Sparkfun Nav Switch Breakout
gnd-
p25U-up
p24C-center or fire
p23L-left
p22D-down
p21R-right
nc – using internal pullups+

MicroSD Breakout Board

https://cdn.sparkfun.com//assets/parts/3/0/6/00544-01.jpg

mbedMicroSD Breakout
p10CS
p11DI
VOUTVCC
p13SCK
GNDGND
p12DO
ncCD

Potentiometer

https://cdn.sparkfun.com//assets/parts/3/8/2/3/09806-01.jpg

mbedPotentiometer
VOUT3.3V
p16P
GNDGND

Demo Implementation and Code

Import program4180_Final_Project

4180 Final


Please log in to post comments.