Our project is a clone of the classic arcade game, Space Invaders, but with some additional features over other mbed clones.

Dependencies:   mbed mbed-rtos 4DGL-uLCD-SE

  1. Authors Jonathan Quang and Daniel Martin
  1. Overview Our project is a clone of the classic arcade game (based on Devon Cooper's and Sidak Dhillon's clone), Space Invaders, but with some additional features over other mbed clones. The basic features we have are a joystick that moves the player's ship, a button to fire bullets from the ship, and a LCD screen to display the game. However, our clone boasts some additional feature over other mbed clones. We have added functionality for second player that can connect to the game over a bluetooth module using the Bluefruit Connect app on a Bluetooth enabled phone. Additionally, we added sound effects (with adjustable volume) and LED effects to improve immersion into the game. We have also added a player vs player gamemode, a way to track score and lives, a game over menu with some music, and a starting menu to select gamemodes and to manage the connection of both players.
  1. Hardware - [mbed LPC1768](https://os.mbed.com/platforms/mbed-LPC1768/) - [Sparkfun PCB speaker 8ohm .1W](https://os.mbed.com/users/4180_1/notebook/tpa2005d1-class-d-audio-amp/) - [TI TPA2005D1 class D audio amp chip (250Khz PWM)](https://os.mbed.com/users/4180_1/notebook/tpa2005d1-class-d-audio-amp/) - [uLCD-144-G2](https://os.mbed.com/users/4180_1/notebook/ulcd-144-g2-128-by-128-color-lcd/) - [KY-023 PS2 joystick axis sensor](https://arduinomodules.info/ky-023-joystick-dual-axis-module/) - [Adafruit Bluefruit BLE board](https://os.mbed.com/users/4180_1/notebook/adafruit-bluefruit-le-uart-friend---bluetooth-low-/) - [5v 2AC adapter](https://www.digikey.com/en/products/detail/wurth-electronics-inc/694106301002/5047522?utm_adgroup=Barrel%20-%20Power%20Connectors&utm_source=google&utm_medium=cpc&utm_campaign=Shopping_Product_Connectors%2C%20Interconnects_NEW&utm_term=&utm_content=Barrel%20-%20Power%20Connectors&gclid=Cj0KCQjw-LOEBhDCARIsABrC0TlTFUNaJdsN-9aJB1ibh7JMV1RMs3MJ0_6Dr17MpBX6kMGLQGHtjRsaAuz2EALw_wcB) - [10K ohm breadboard trim potentiometer](https://www.sparkfun.com/products/9806) - Red and Blue LEDs with two 330 Ohm Resistors
  1. Circuit Connections
Mbed PinTPA2005D15V 2A AC adapterSpeakerPotentiometer
----------------
GNDpwr-, in-GND
pwr+Positive
p21 (PWM)in+
out++
out--
vol+fixed end 1
vol gainvariable end
vol-fixed end 2
Mbed PinLCD Pin
-----
p27RX
p28TX
p30RES
GNDGND
VU+5V
Mbed PinKY-023
----
GNDGND
VU (5v)+5v
p15VRx
p16VRy
p22SW
Mbed PinBluetooth BLE Board
--------
GNDGND
VU (5v)Vin (3.3-16v)
No connectionRTS
GNDCTS
p14TXO
p13RXI
Mbed PinRed LED with Resistor in SeriesBlue LED with Resistor in Series
-----------------
GNDnegative endnegative end
p20positive end
p24positive end

![Circuit](https://jonathanquang.github.io/ECE4180-Space-Invaders-Clone-Expanded-with-Multiplayer/circuit_diagram.png)

  1. Images of Project

![Collage](https://jonathanquang.github.io/ECE4180-Space-Invaders-Clone-Expanded-with-Multiplayer/menu_collage.png) ![Menu](https://jonathanquang.github.io/ECE4180-Space-Invaders-Clone-Expanded-with-Multiplayer/space_menu.jpg) ![Blue](https://jonathanquang.github.io/ECE4180-Space-Invaders-Clone-Expanded-with-Multiplayer/space_blue.jpg) ![Shoot](https://jonathanquang.github.io/ECE4180-Space-Invaders-Clone-Expanded-with-Multiplayer/space_shoot.jpg)

  1. Code Repositories Used

[Devon Cooper's and Sidak Dhillon's Space Invaders Clone](https://os.mbed.com/users/DNoved1/code/Space_Invaders_Clone/)

[Playing Songs via PWM](https://os.mbed.com/users/4180_1/code/song_demo_PWM/)

  1. Future Work

- Include more gamemodes - Improve audio system to support .wav files loaded from an SD card. - Include other methods of user input, such as a gyroscope - Add ways to play over the internet with the Ethernet module