MaxChess
Published © GPL3+

Raspberry PI Noughts and Crosses/Tic Tac Toe

Build this noughts and crosses game first and you can build a sensory chessboard!

IntermediateFull instructions provided8 hours2,841
Raspberry PI Noughts and Crosses/Tic Tac Toe

Things used in this project

Hardware components

Raspberry Pi Zero
Raspberry Pi Zero
×1
Creator MCP23017
×1
Adafruit HT16K33 16×8 LED Matrix Driver
×1
Adafruit RGB LCD Shield Kit
×1
5 mm LED: Red
5 mm LED: Red
×9
3DR reed switch
×9

Story

Read more

Schematics

Raspberry Pi Noughts & Crosses Schematic

Code

Code snippet #1

Plain text
Once you are sure the connections are right, boot up the PI, 
get to a command prompt and type:

                                            i2cdetect -y 1

You should get:
pi@raspberrypi:~/$ i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- 21 -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: 70 -- -- -- -- -- -- --

Code snippet #2

Plain text
Once you are sure the connections are right, boot up the PI, 
get to a command prompt and type:

                                            i2cdetect -y 1

You should get:
pi@raspberrypi:~/$ i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- 21 -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: 70 -- -- -- -- -- -- --

Noughts and Crosses Code File

The main noughts and crosses program and test programs

Credits

MaxChess

MaxChess

4 projects • 35 followers
Dabbling techy that builds stuff with RPIs and Arduinos
Thanks to The Site.

Comments