Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

DIY Arduino Tic Toc Toe Game

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

instructables

DIY Arduino Tic Toc Toe Game

by Mukesh_Sankhla

Tic Tac Toe game is a two player classic game. It in it. If a pixel is been pushed then it should light with
becomes fun when you play it with your kids,family its set color. This game is set with two colors Sky Blue
and friends. Here I have shown how to make a Tic Tac color representing Player 1 and Pink color
Toe game using a Arduino Uno,Push buttons and Pixel representing Player 2. If a player wins then all the
LEDs. This Arduino based 4 by 4 Tic Tac Toe is same as LEDs should animate with that player color. If game is
the classic Tic Tac Toe,only the di erence is X and O's draw then all the LEDs should animate with Red color.
are represented in two di erent colors.This game has After completion of one game,the game should be
a program written in it which can decide who is restarted to do that we have a reset button connected
winner or the game is draw.This project is basically a 4 to Arduino.
by 4 RGB Matrix with each pixel having a push button

https://youtu.be/yWTqSxcSifo

Step 1: Components Required:

Arduino Uno (1)


WS2812B LEDs or NeoPixel LEDs (16)
Push Buttons (17)
3.7V/5V Battery (1)
ON/OFF Switch (1)
3D Printed Parts

DIY Arduino Tic Toc Toe Game: Page 1


Step 2: 3D Printing:

3D print all the parts provided in the link below.


3D Print 16 small button in white PLA and remaining parts can be 3D printed in any color you want.
Link for STL Files: https://drive.google.com/drive/folders/1sGYkr8k3g...
After printing all the parts install all the 16 white buttons in the array using some fast glue.

DIY Arduino Tic Toc Toe Game: Page 2


Step 3: Making Push Buttons KeyPad :

Take a piece of cardboard,mark the positions with respect to 3D printed array on the cardboard.
Glue all the 16 push buttons on the cardboard on the marked positions.
Make all the connections by soldering the buttons with the help of some wires.

DIY Arduino Tic Toc Toe Game: Page 3


Step 4: Circuit Connection:

Connect the push buttons keypad to Arduino Uno as shown in circuit diagram.
(R1~A0,R2~A1,R3~A2,R4~A3,C1~A4,C2~A5,C3~Pin 2,C4~Pin 3).
Also take a extra push button(Reset Button) and connect to Arduino.(Reset,GND).
Connect all the pixel LEDs.(-Ve/GND~GND,+Ve/5V~5V,Data In~Pin 5).
I have used WS2812b LEDs,You can use the led strips which may be more convenient to use.
Connect 3.7V/5V Batter with a ON/OFF Switch.
Insert All the LEDs in each white 3D printed Buttons,one LED per each button.

DIY Arduino Tic Toc Toe Game: Page 4


Step 5: Code:

Open the code in Arduino IDE : https://drive.google.com/drive/folders/1KeANdMzzXC...


Install the KeyPad library and FastLED library into the Arduino IDE.
Connect Arduino Uno to your PC.
Select Board Type and Port.
Upload the code.

DIY Arduino Tic Toc Toe Game: Page 5


Step 6: Rules to Play:

Sky Blue represents Player 1.


Pink represents Player 2.
Players should not push the button which is already been pushed.
If any player wins the matrix will animate with his color.
If Game is draw then matrix will animate with red color.

This is fantastic! Nice job on the project and the tutorial :)

Thank you for supporting me.

DIY Arduino Tic Toc Toe Game: Page 6

You might also like