Arduino Snake LED game

By on September 4, 2021
Pin It

In this project we will see how to recreate the Snake game on a matrix of LEDs. After loading, the game will automatically start with the snake in the lower left corner. An apple will randomly spawn and you can start moving the snake with a joystick.

We have an 8 x 12 matrix of LEDs with ws2811 chips powered by an external 5v power supply. This game works with matrix of any size with minor code changes. We use an Arduino (in this case Mega) to control the lights in the matrix. The circuit diagram is shown below.

The joystick is an analog stick that requires only 3 inputs for the Arduino: 2 analog inputs to read the x and y direction and a digital input to know if the analog stick is pressed. All wiring and power supply are hidden inside the table.

More info

 

About Bianchi Gabriele

Leave a Reply

Your email address will not be published. Required fields are marked *