F19: Pocket tank
Contents
Pocket Tanks
Abstract
Pocket Tanks is a fast-paced and incredibly fun artillery game. It's a one versus one battle between two tanks the aim being to destroy your opponent with firepower or bury him by firing into the surrounding landscape..
Objectives & Introduction
Show list of your objectives. This section includes the high level details of your project. You can write about the various sensors or peripherals you used to get your project completed.
Team Members & Responsibilities
- Adithya Baskaran
- Game development, PCB design,Mp3.
- Tarun Chawla
- Game development.
Schedule
Week# | Date | Task | Status |
---|---|---|---|
1 | 10/1/2019 |
|
|
2 | 10/15/2019 |
|
|
3 | 10/22/2019 |
|
|
4 | 10/29/2019 |
|
|
5 | 11/5/2019 |
|
|
6 | 11/12/2019 |
|
|
7 | 11/19/2019 |
|
|
8 | 11/26/2019 |
|
|
9 | 12/3/2019 |
|
|
10 | 12/10/2019 |
|
|
11 | 12/17/2019 |
|
|
Parts List & Cost
Item# | Part | Manufacturer | Quantity | Cost($) |
---|---|---|---|---|
1 | SJ Two Board | Preet | 1 | 50.00 |
2 | Adafruit RGB LED Matrix | Adafruit | 1 | 62.00 |
3 | Power Adapter | Power Supply | 1 | 7.95 |
4 | JLC PCB | JLC PCB | 1 | 22.00 |
6 | Miscellaneous (Jumper Wires, Connectors, Switches) | Excess Solution | 2.00 |
- Total Cost: $143.95
Design & Implementation
The design section can go over your hardware and software design. Organize this section using sub-sections that go over your design and implementation.
[[File:]]
Hardware Design
Discuss your hardware design here. Show detailed schematics, and the interface here.
Hardware Interface
In this section, you can describe how your hardware communicates, such as which BUSes used. You can discuss your driver implementation here, such that the Software Design section is isolated to talk about high level workings rather than inner working of your project.
Software Design
Show your software design. For example, if you are designing an MP3 Player, show the tasks that you are using, and what they are doing at a high level. Do not show the details of the code. For example, do not show exact code, but you may show psuedocode and fragments of code. Keep in mind that you are showing DESIGN of your software, not the inner workings of it.
Implementation
This section includes implementation, but again, not the details, just the high level. For example, you can list the steps it takes to communicate over a sensor, or the steps needed to write a page of memory onto SPI Flash. You can include sub-sections for each of your component implementation.
Testing & Technical Challenges
- Non-availability of datasheet for ADAFRUIT 32x32 RGB LED Matrix was a major challenge. This made the understanding of pin configuration details difficult. Subsequently, we extracted ADAFRUIT GFX library and created an interface class to make it compatible with our project requirements.
- It was hard to determine the refresh rate for LED Matrix. Low refresh rate would cause display to flicker and a high refresh rate would slow down the display update rate thereby causing overhead. Through trial and error, we came up with a value of 500us for RIT interrupt which was an ideal refresh rate value.
- It was great challenge to implement the pause feature in the game. We had to capture the real time movement of the attacks when the user hit pause and resume the game from same position. The push button switch on joystick was used to pause and game would resume with input direction.
- Starting the game with initial tank position was challenging due to the designed algorithm. This was overcome by calculating the tank location before start of the game by hard-coding the default direction on game start.
- Approach to design a PCB to meet the project requirements was complex. We had to redesign the circuit schematic and layout thrice to ensure that it was robust. Moreover, We had to import libraries from Sparkfun and adafruit for various components and also make sure that the same were available with Digikey.
<Bug/issue name>
- The LED Matrix display was constantly flickering and we couldn't narrow down the reason behind it. Once we solidified the circuits it stopped.
- The top-leftmost LED blinks whenever game restarts. This was bug which couldn't be resolved.
Conclusion
The project was a success both in terms of output and learnings. We were able to design the pocket tanks game which has been controlled via a handheld joystick using push buttons. It gave an exposure of working drivers for 16x32 RGB LED Matrix, push buttons and active buzzers. It helped us utilize the knowledge of FreeRTOS and GPIO driver gained through the CMPE-244 class.
Working as a team and having brainstorming sessions helped us in overcoming a lot bugs which we encountered during game design. Furthermore, it helped in expediting the integration, testing and debugging of the project days before final demonstration. On the whole, we had a wonderful experience of working in a team and developing a complete product using professional tools and techniques.
Project Video
Upload a video of your project and post the link here.
Project Source Code
References
Acknowledgement
We would like to sincerely thank Professor Preetpal Kang for his allround guidance, feedback and support. His classroom lectures were significant in imparting knowledge on embedded systems. Further, we would like to thank ISA team for their advice.
References Used
https://cdn-learn.adafruit.com/downloads/pdf/32x16-32x32-rgb-led-matrix.pdf?timestamp=1543806512/
Appendix
You can list the references you used.