Animal Sound Game

Animal Sound Game

Animal Sound Game is a game designed to test players knowledge. Players will be shown a series of animal images and played a series of sounds. Afterwards, they will be prompted to input which sound they thought was the correct one. This is repeated until the last image, and the user is informed of their score.

Images are loaded onto a raw partition on an SD card attached to the uLCD. Sounds are loaded onto an SD card interfaced to MBED. An I2C capacitive touch pad registers inputs via a software interrupt routine. A speaker and audio amp play animal sounds.

The program flow begins with a welcome screen and 4 second wait, followed by a prompt to press 0 to begin the game. Once 0 is pressed on the touchpad, the first image of a bear is displayed. Three sounds are played, two incorrect and one correct. After this, an image asking the user to select which sound they think is correct is displayed on the LCD. The user is then informed whether they are incorrect or correct on another image. This is repeated twice more. At the end, the user is thanked and the number of correct answers displayed. /media/uploads/gotmilk/win_20161031_165735.jpg

Required parts

The game uses an LCD, two SD cards (One for loading images on the LCD, another for loading sounds), a touchpad for input, and speaker with audio driver. The LCD and audio driver are powered by an external 5V power supply.

  • MPR121 I2C Capacitive Touch Sensor with 2 4.7K pullup resistors
  • uLCD-144-G2 128 by 128 Smart Color LCD
  • TI TPA2005D1 Class D Audio Amp
  • speaker
  • 2 microSD cards
  • mbed
  • SparkFun microSD breakout board
  • wires

uLCD wiring

mbedpin
External 5V+5V
p27TX
p28RX
GNDGND
p30RES

Information

One microSD card goes onto the uLCD itself. Image loading must be done using the 4D IDE graphical tool.

I2C Touchpad

mbedpin
GNDGND
VuVCC
p9SDA
p10SCL
p26IRQ

I2C Pullup!

SDA and SCL must be pulled up!

TI TPA2005D1 Class D Audio Amp

mbedpinspeaker
GNDpwr-,in-
External 5Vpwr+
p26in +
out++
out--

SD card reader

mbedpin
GNDGND
VUVCC
p8CS
p5DI
p6DO
p7SCK

Import programAnimalSoundGame

A game by Ibrahim Khan and Saad Khan


Please log in to post comments.