This is an old revision of the document!


Snake Game

Introduction

My project is a copy of the popular game “Snake” displayed on an 8×8 Module LED Matrix using an Arduino UNO R3 board.

My inspiration came from my childhood when I was an avid fan of this and often played it trying to get a higher and higher score.

My aim is to try and recreate the game so that anyone can share in the fun of this old-school classic.

General Description

My project uses an Arduino UNO R3 board as its base, as well as an 8×8 Module LED Matrix to display the game itself as well as the score, a Module Joystick to control the Snake's movements during the game and a buzzer that makes noises whenever you pick up a fruit or lose.

Hardware Design

List of Parts:

  • Arduino Uno R3

  • 8×8 Module LED Matrix

  • Passive Buzzer

  • Module Joystick

  • Wires

Software Design

The code was developed using the Arduino IDE, and the LedControl.h library was used for the LED matrix.

The main functions that were used were:

generateFood()

calculateSnake()

fixEdge()

void handleGameStates()

Results

The result is a pretty vivid recreation of the original Snake Game. I would say it is quite good given the limited technology I used in comparison. Only major flaw I see is that if the snake is exactly the length of the LED matrix there is no way to tell where the head is, the snake just forming a line. It doesn't impede your experience in any way but I find it quite annoying.

Conclusions

In summary, my Arduino Uno Snake game project is a fun and educational demonstration of how programming and hardware can come together to create an engaging gaming experience. It has been an exciting journey that has taught me valuable skills and sparked my curiosity about microcontrollers.

Download

Code for the game : snake_game.txt

Bibliografy/Resources

Listă cu documente, datasheet-uri, resurse Internet folosite, eventual grupate pe Resurse Software şi Resurse Hardware.

Export to PDF

pm/prj2023/apredescu/gameofsnake.1685295222.txt.gz · Last modified: 2023/05/28 20:33 by mihai.andrei3105
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0