Difference between revisions of "F19: Pocket tank"

From Embedded Systems Learning Academy
Jump to: navigation, search
()
(Testing & Technical Challenges)
Line 188: Line 188:
  
 
== Testing & Technical Challenges ==
 
== Testing & Technical Challenges ==
Describe the challenges of your project.  What advise would you give yourself or someone else if your project can be started from scratch again?
+
* 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.
Make a smooth transition to testing section and described what it took to test your project.
+
* 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.
  
Include sub-sections that list out a problem and solution, such as:
 
  
 
=== <Bug/issue name> ===
 
=== <Bug/issue name> ===

Revision as of 08:23, 18 December 2019

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
  • Submission of Project Proposal
  • Completed
2 10/15/2019
  • Research Required Components.
  • Submit plan for upcoming weeks
  • Completed
3 10/22/2019
  • Analyze the modules.
  • Order Parts and Identify Roles
  • Completed


4 10/29/2019
  • Finalize the circuit design.
  • Start with the ability to control each and every row and column.
  • In-progress
5 11/5/2019
  • Circuit Simulation and PCB Layout Design.
  • Finalize Components and placement on PCB.
  • Create a background for the game.
  • In-progress
6 11/12/2019
  • Start with the movement of the tanks.
  • Implement the collision logic.
  • In-progress
7 11/19/2019
  • Implement the Impact logic.
  • Attacks using on board buttons.
  • In-progress
8 11/26/2019
  • Joystick Integration with game.
  • In-progress
9 12/3/2019
  • Updating the existing Game Design & Testing it.
  • In-progress
10 12/10/2019
  • Complete end-to-end testing for various scenarios and conditions.
  • In-progress
11 12/17/2019
  • Testing and final bug fixes.
  • Complete wiki report.
  • In-progress

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.

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.


<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.