Electric Four-in-a-Row

by Emily Su in Circuits > Arduino

92 Views, 3 Favorites, 0 Comments

Electric Four-in-a-Row

2024年5月19日
228063.jpg

Experience the classic Connect Four game with a modern twist through the Electronic Connect Four device, featuring 14 buttons and 42 LED lights. This innovative game includes 14 intuitive buttons for column selection and a 6x7 grid of LEDs that light up in red and yellow to represent player moves, enhancing visual appeal and gameplay clarity. Players take turns pressing buttons to drop dynamic lighting tokens into the grid, aiming to align four in a row to win, whether vertically, horizontally, or diagonally. Not only fun, this game promotes strategic thinking, problem-solving, and hand-eye coordination, making it ideal for all ages. Rediscover the charm of Connect Four with this engaging, technologically advanced version.

Supplies

14Buttons

24 LEDs

Arduino Leonardo

Breadboard

Transistor

Welding

218867.jpg
218870.jpg
226766_0.jpg

Use a soldering gun and solder to connect the buttons and LED lights


Wiring

226764_0.jpg
228062.jpg
228061.jpg
228060.jpg
226774_0.jpg
226768_0.jpg
218862_0.jpg
226773_0.jpg

Connect the LED light to D2

Connect the first red and yellow buttons to D3

Connect the second red and yellow buttons to D4

Connect the third red and yellow buttons to D5

Connect the fourth red and yellow buttons to D6

Connect the fifth red and yellow buttons to D7

Connect the sixth red and yellow buttons to D8

Connect the seventh red and yellow buttons to D9

Connect the transistor that is connected to the red button to D10

Connect the transistor that is connected to the yellow button to D11







Crafting the Look

226789.jpg
226755_0.jpg
226765_0.jpg
226754_0.jpg
226752_0.jpg
226782_0.jpg
226778_0.jpg
226781_0.jpg

You need 42 holes on the screen, and 14 holes for the buttons

Then decorate it how you like.

Program

 Adding Neopixels Adafruit library:

- Go to Sketch->include library->manage libraries...

- Search and install Adafruit NeoPixel