Monkey Type Videogame on MBED LPC1768

Georgia Institute of Technology

ECE 4180 - Spring 2023

Creators: Rony Stephan, Andrew Wang

Table of Contents

  1. Project Motivation
  2. Final Showcase
  3. Electronic Components
  4. Software Flowchart
  5. Pin Connections
  6. System Schematic
  7. Game Operation
  8. Future Improvements

Project Motivation

For this project, we really enjoyed learning about the ability of the MBED to emulate and recieve user input. We wanted to focus on something that put MBED's ability to parse user input to the test, by creating a type racing game. Inspired by the popular Monkeytype, we wanted to create an MBED type racing game. Our game models Monkeytype closely, but includes many Mbed-specific implementation details to bring the game to life on such a low-power device.

Final Showcase

MonkeyType MBED

Electronic Components

Software Flowchart

Pin Connections

MBED and uLCD display

uLCD Mbed
5V 5V
GND GND
TX p9
RX p10
RST p11

MBED and PS/2 Keyboard Note: PS/2 connector pin wiring begins at the top right pin, which is p1, travels clockwise ends at the top left pin, which is p6

Mbed PS2
p1
5V p2
p3
p5 p4
GND p5
p6 p6

MBED, TPA2005D1 Amp, and Speaker

MBED TPA Speaker
5V PWR+
GND PWR-
p26 in+
GND in-
out+ +
out- -

System Schematic

Game Operation

Upon booting up the game, our user is presented with a list of words to type, alongside a 30-second timer. These words are generated from a list of the 500 most commonly used words in the English Language.

The countdown begins, and the user is tasked to type as many words correctly as they can in 30 seconds. Each incorrect letter typed shows up as red on the LCD, while correct letters are green. Once a word is completed, the user can press the space bar or "enter" key to move on to the next word.

This process continues for 30 seconds, alongside real-time accuracy and WPM calculations. Upon completion of the game, the MBED moves to a "Game Over" state where it shows important statistics, like words and characters typed, along with accuracy and WPM calculation. A short tune accompanies this screen, played using PWM audio output.

Future Improvements

We have a couple of changes we wish to implement.

  1. Backspace Feature: Due to our specific game logic, implementing the backspace feature was not possible within our project's time frame. In the future, we would like to find a way to implement this feature while maintaining the core functionality of the game.
  2. Start/Reset Screen: We would like to give the user the ability to play multiple games, instead of resetting the Mbed in between each trial.
  3. Input Buffer/Reduce Input Lag: Some users experienced input lag when typing too quickly. We hope to remedy this input lag by either increasing the size of the input buffer or reducing the processing time needed to process an input. Both of these changes may aid the user at the expense of lots of processing power.
  4. Increase Word Library/Randomness of Selection: Currently, we have about 420 words in our library. While this is quite expansive, it means users could still find repeat words. Moreover, our random number generation technology, which uses the noise level on an unconnected pin, can sometimes experience duplicate values. In future implementations, we would like to replace this with a more truly random strategy.
  5. Upgraded Statistics: we wish to add a more robust statistics page. This could include things like a rolling WPM graph, error scatter plot, or accuracy graph. These features would enhance the user's experience and allow them to gain usable information from our game.