This shows you the differences between two versions of the page.
pm:prj2023:avaduva:tictactoe [2023/05/28 23:09] dragos_mihai.negrea |
pm:prj2023:avaduva:tictactoe [2023/05/29 16:27] (current) cosmin.draghici0305 |
||
---|---|---|---|
Line 1: | Line 1: | ||
Introduction: | Introduction: | ||
- | The game of Tic Tac Toe has been known since Ancient Egypt and is undoubtedly one of the most popular of all time. However, the methods for playing it vary greatly, thus in this project I set out to create a device that can be used for Tic Tac Toe. | + | <note>The game of Tic Tac Toe has been known since Ancient Egypt and is undoubtedly one of the most popular of all time. However, the methods for playing it vary greatly, thus in this project I set out to create a device that can be used for Tic Tac Toe.</note> |
General Description: | General Description: | ||
- | + | <note> | |
- | The grid is represented by a matrix of RGB LEDs, with each player having a color (rather than a symbol - "X" or "0") that he selects from a set of predefined colors (red, green, blue, yellow, magenta, and cyan) before the start of the game. Using the buttons ("", "", and "ok"), players can select the box in which they enter their color. At each stage of the game, the score and several indicators are presented on an LCD monitor. Throughout the game, the grid's edge pulses in the color of the player whose turn it is. | + | The grid is represented by a matrix of RGB LEDs, with each player having a color (rather than a symbol - "X" or "0") that he selects from a set of predefined colors (red, green, blue, yellow, magenta, and cyan) before the start of the game. Using the buttons ("", "", and "ok"), players can select the box in which they enter their color. At each stage of the game, the score and several indicators are presented on an LCD monitor. Throughout the game, the grid's edge pulses in the color of the player whose turn it is.</note> |
Line 15: | Line 15: | ||
{{:pm:prj2023:avaduva:9cf5b9624e52b59bdcf41206a128bfed.png?400|}} | {{:pm:prj2023:avaduva:9cf5b9624e52b59bdcf41206a128bfed.png?400|}} | ||
- | |||
- | Biblioteci folosite: | ||
- | |||
- | [[https://learn.adafruit.com/adafruit-neopixel-uberguide/arduino-library-use]] | ||
- | [[https://www.arduino.cc/reference/en/libraries/liquidcrystal/]] | ||
Software desing: | Software desing: | ||
+ | <note> | ||
The code starts by including the libraries required for controlling NeoPixel LEDs (Adafruit_NeoPixel) and LCD screens (LiquidCrystal). | The code starts by including the libraries required for controlling NeoPixel LEDs (Adafruit_NeoPixel) and LCD screens (LiquidCrystal). | ||
Line 56: | Line 51: | ||
To announce the winning player, the celebrate() method shows a message on the LCD. | To announce the winning player, the celebrate() method shows a message on the LCD. | ||
- | To signify a tie game, the draw() method shows a message on the LCD. | + | To signify a tie game, the draw() method shows a message on the LCD.</note> |
Code Source: | Code Source: | ||
Line 64: | Line 59: | ||
===== Bibliografy/Resources ===== | ===== Bibliografy/Resources ===== | ||
+ | |||
+ | |||
+ | [[https://learn.adafruit.com/adafruit-neopixel-uberguide/arduino-library-use]] | ||
+ | |||
+ | [[https://www.arduino.cc/reference/en/libraries/liquidcrystal/]] | ||
+ | |||
+ | |||
<html><a class="media mediafile mf tictactoe" href="?do=export_pdf">Export to PDF</a></html> | <html><a class="media mediafile mf tictactoe" href="?do=export_pdf">Export to PDF</a></html> |