commit 53857ca5ada74d84e30ea77447dc59f699ee25d0 Author: Xavi Date: Sat Jan 28 12:43:53 2023 -0800 Added Documentation diff --git a/README.md b/README.md new file mode 100644 index 0000000..8fa3323 --- /dev/null +++ b/README.md @@ -0,0 +1,23 @@ +# Project Brief + +## Project Description +This is a miniature arcade machine that can be played utilizing an accompanying phone app. The objective of this project is to provide a fun desk decoration that can be turned on, connected to, and played quickly during downtime. The projected subsystems of this project include the audio, video, wireless connection, app, game logic, and 3D design. + +A small speaker is employed for audio, a color LCD for video, and a PMOD Bluetooth module for the interface between the phone app and the FPGA through bluetooth. The chassis is designed utilizing openSCad and is printed from a FDM printer, specifically the Ender 3 pro, using black eSun PLA+. The game logic is based off of the 1978 arcade game Space invaders. + +![Blackbox Diagram](diagrams/blackbox/blackbox_v3.png "Blackbox Diagram") + +![Design Reference](./images/inspo_arcade_resized.jpg) + +[Image Reference](https://www.amazon.com/My-Arcade-Micro-Player-Machine/dp/B0897SHB6P/ref=sr_1_10?dchild=1&keywords=mini+arcade&qid=1600134827&sr=8-10) + + +## Part List + +| Part | Quantity | Link | Price (USD) | +| ---- | -------- | ---- | ----------- | +| Screen | 1 | [Amazon](https://www.amazon.com/HiLetgo-240X320-Resolution-Display-ILI9341/dp/B073R7BH1B/ref=sr_1_2?dchild=1&keywords=TFT+ILI9341&qid=1600046103&sr=8-2) | 13.99 | +| Speaker | 1 | [Amazon](https://www.amazon.com/Yootop-Internal-Magnet-Loudspeaker-Speaker/dp/B07FMR5JGX/ref=sr_1_1?crid=TT1W7X8FLQTN&dchild=1&keywords=speaker+arduino&qid=1600126458&sprefix=speaker+ard%2Caps%2C226&sr=8-1) | 8.99 | +| FPGA | 1 | [Crowd Supply](https://www.crowdsupply.com/1bitsquared/icebreaker-fpga) | 69.00 | +| PLA+ | 1 | [Amazon](https://www.amazon.com/eSUN-1-75mm-Printer-Filament-2-2lbs/dp/B01EKEMDA6/ref=sxts_sxwds-bia-wc-p13n1_0?cv_ct_cx=esun+black&dchild=1&keywords=esun+black&pd_rd_i=B01EKEMDA6&pd_rd_r=e16e0515-7751-4130-9160-87e87d9693c6&pd_rd_w=i5Fmf&pd_rd_wg=yDAMG&pf_rd_p=e7ea7987-56a0-4822-adda-f67db5e22b16&pf_rd_r=Z6M4E0JNS14RG6T6WSZ5&psc=1&qid=1600135643&sr=1-1-791c2399-d602-4248-afbb-8a79de2d236f) | 23.99 | +| | | Total | 115.97 | diff --git a/diagrams/blackbox/blackbox_v1.png b/diagrams/blackbox/blackbox_v1.png new file mode 100644 index 0000000..b907a7f Binary files /dev/null and b/diagrams/blackbox/blackbox_v1.png differ diff --git a/diagrams/blackbox/blackbox_v2.png b/diagrams/blackbox/blackbox_v2.png new file mode 100644 index 0000000..87e81c9 Binary files /dev/null and b/diagrams/blackbox/blackbox_v2.png differ diff --git a/diagrams/blackbox/blackbox_v3.png b/diagrams/blackbox/blackbox_v3.png new file mode 100644 index 0000000..f28cd88 Binary files /dev/null and b/diagrams/blackbox/blackbox_v3.png differ diff --git a/diagrams/dot_files/blackbox_v1.dot b/diagrams/dot_files/blackbox_v1.dot new file mode 100644 index 0000000..18efdc2 --- /dev/null +++ b/diagrams/dot_files/blackbox_v1.dot @@ -0,0 +1,18 @@ +digraph blackbox_v1 { + splines = ortho; + rankdir = LR; + + + node [shape = box, label = "MCU"] mcu; + node [shape = plaintext, label = "Wireless Adapter"] wireless_adapter; + node [shape = plaintext, label = "Display"] video; + node [shape = plaintext, label = "Speaker"] audio; + node [shape = box, label = "Phone Application"] app; + + + mcu -> {audio, video}; + wireless_adapter -> mcu; + app -> wireless_adapter; + +} + diff --git a/diagrams/dot_files/blackbox_v2.dot b/diagrams/dot_files/blackbox_v2.dot new file mode 100644 index 0000000..0a56e38 --- /dev/null +++ b/diagrams/dot_files/blackbox_v2.dot @@ -0,0 +1,18 @@ +digraph blackbox_v1 { + splines = ortho; + rankdir = LR; + + + node [shape = box, label = "Atmega 1284p"] mcu; + node [shape = plaintext, label = "HC-06"] wireless_adapter; + node [shape = plaintext, label = "ILI9341 SPI TFT LCD"] video; + node [shape = plaintext, label = "1W 8Ohm Round Internal Magnet speaker"] audio; + node [shape = box, label = "Phone Application"] app; + + + mcu -> {audio, video}; + wireless_adapter -> mcu; + app -> wireless_adapter; + +} + diff --git a/diagrams/dot_files/blackbox_v3.dot b/diagrams/dot_files/blackbox_v3.dot new file mode 100644 index 0000000..4b0d24c --- /dev/null +++ b/diagrams/dot_files/blackbox_v3.dot @@ -0,0 +1,18 @@ +digraph blackbox_v1 { + splines = ortho; + rankdir = LR; + + + node [shape = box, label = "IceBreaker - Lattice ICE40"] fpga; + node [shape = plaintext, label = "Bluetooth PMOD"] wireless_adapter; + node [shape = plaintext, label = "ILI9341 SPI TFT LCD"] video; + node [shape = plaintext, label = "1W 8Ohm Round Internal Magnet speaker"] audio; + node [shape = box, label = "Phone Application"] app; + + + fpga -> {audio, video}; + wireless_adapter -> fpga; + app -> wireless_adapter; + +} + diff --git a/docs/Spec.md b/docs/Spec.md new file mode 100644 index 0000000..55b70ed --- /dev/null +++ b/docs/Spec.md @@ -0,0 +1,41 @@ +## Introduction + +### System Purpose + +This is a miniature arcade machine that can be played utilizing an accompanying phone app. The objective of this project is to provide a fun desk decoration that can be turned on, connected to, and played quickly during downtime. It should be small enough as too not intrude on desk space but large enough to contain a screen large enough to facilitate an enjoyable playing experience. + +### Definitions, Acronyms, and Abbreviations + +#### Definitions + +OpenSCad - script based computer aided design software (CAD) for modeling 3D objects\ +Bluetooth - wireless standard used for data exchange + +#### Acronyms and Abbreviations + +FPGA - Field Programmable Gate Array\ +PLA - Plastic used for printing chassis(Polylactic acid)\ +FDM - 3D printing Process (Fused Filament Fabrication)\ + +## General System Description + +### System Overview + +The projected subsystems of this project include the audio, video, wireless connection, app, game logic, and 3D design. + +![Blackbox Design](../diagrams/blackbox/blackbox_v2.png) + +A small speaker is employed for audio, a color LCD for video, and a PMOD Bluetooth module for the interface between the phone app and the FPGA through bluetooth. The chassis is designed utilizing openSCad and is printed from a FDM printer, specifically the Ender 3 pro, using black eSun PLA+. The game logic is based off of the 1978 arcade game Space invaders. + +#### External Inputs and Outputs +| Name | Description | Use | +| - | - | - | +| Phone Application (Input) | Phone Application that allows for directional input, a fire button, a select button, and a start button | Allows for user to interact with the game on the arcade | +| Display | An LCD that displays the different frames of the game when the arcade is switched on | Allows user to interact with the game | +| Audio | A Speaker that plays sound cues and music when the arcade is switched on | Creates a more immersive experience | + + +### System Context + +The arcade can be kept as a desk decoration due to its small size. During down time, a user can turn on the arcade using a switch that is located on the back of the arcade. The arcade powers on and, after it is finished booting up, starts waiting for a bluetooth connection to be made. The user can then take out their smart phone, and open the Space Arcade app. Through the app, they can connect to the arcade and press start to start the game. The game is a simple space invaders clone that keeps track of score which is gained when an alien is shot down. After a board is cleared, the game speed increases and the aliens start shooting back more frequently. After the player loses all 3 lives the game is over and the score is saved if it is within the top 3 scores and the scoreboard is updated. The game asks if the player wants to play again. If the player wants to play again they press start and the game starts over. + diff --git a/images/inspo_arcade.jpg b/images/inspo_arcade.jpg new file mode 100644 index 0000000..c06dda3 Binary files /dev/null and b/images/inspo_arcade.jpg differ diff --git a/images/inspo_arcade_resized.jpg b/images/inspo_arcade_resized.jpg new file mode 100644 index 0000000..cb90182 Binary files /dev/null and b/images/inspo_arcade_resized.jpg differ