
This project implements a Tic-Tac-Toe game using multiplexed RGB LEDs. Each of the 9 game fields is displayed using a common-cathode RGB LED. When a player presses a button assigned to a cell, the logic evaluates the current game state and updates only that cell. When a winning combination is detected, the logic evaluates the grid and drives an additional RGB LED to show the winner’s color.
Wire the circuit according to the Wokwi design (push-buttons, RGB LEDs, connectors). Set the simulation clock to approximately 100 Hz (or faster if preferred). Press any of the 9 buttons to place a move. The LED for that position lights up in the corresponding player color. Continue placing moves alternately. When a player wins, the winner LED displays their color.
9× push-buttons, 10× RGB LEDs (common-cathode), resistors
| # | Input | Output | Bidirectional |
|---|---|---|---|
| 0 | Button_1 | LED_1_RED | ROW_1_GND |
| 1 | Button_2 | LED_4_RED | ROW_2_GND |
| 2 | Button_3 | LED_7_RED | ROW_3_GND |
| 3 | Button_4 | LED_1_BLUE | Button_9 |
| 4 | Button_5 | LED_4_BLUE | |
| 5 | Button_6 | LED_7_BLUE | |
| 6 | Button_7 | LED_WinnerCheck_RED | |
| 7 | Button_8 | LED_WinnerCheck_BLUE |