Close
0%
0%

Arduino UNO Chess Clock

Digital chess clock based on the Arduino UNO + TFT LCD touch screen

Similar projects worth following
This chess clock allows you to program all the most popular time control modes for the game of chess. From the simple time control, to the post-increments and pre-increments of time, as well as the bonuses for moves made in different stages of the game.

Arduino Chess Clock Features
This Arduino TFT LCD Touch Clock has been designed to be used as game clock for Chess or other games

The main features are:

5 different algorithms covering all popular timing standards
Pre-move time increments modes
Post-move time increment modes
Up to 3 different stage definitions per game.
Time mode without increments
Cumulative add-back mode
Non cumulative add-back mode

You can read the complete blog project  at Element14 project blog

Hardware used

This program is compatible with all TFT LCD screens an Arduino models that the Adafruit TFTLCD Library supports.

Hardware:

Arduino Chess Clock Features

This Arduino TFT LCD Touch Clock has been designed to be used as game clock for Chess
The main features are:

  • 5 different algorithms covering all popular timing standards
  • Pre-move time increments modes
  • Post-move time increment modes
  • Up to 3 different stage definitions per game.
  • Time mode without increments
  • Cumulative add-back mode
  • Non cumulative add-back mode
  • Moves control for each stage.
  • Auto selection for whites clock
  • 24 preprogrammed options for quick and ease of use
  • Move counter for all options
  • Pause/Resume the game

Preset modes

  • 01 Time blitz 5 min
  • 02 Time rapid 25 min
  • 03 Time blitz 3 min
  • 04 Time + guillotine 2 hrs f.b. 30 min
  • 05 Time + guillotine 1 hrs f.b. 30 min
  • 06 2 x Time + guillotine 2 hrs f.b. 1 hr f.b. 30 min
  • 07 Time + repeating 2nd period 2 hours f.b. 1 hour (repeating)
  • 08 Time + Bonus (“Fischer”) 25 min f.b. 5 min + 10 sec./move
  • 09 Time + Bonus (“Fischer”) 2 hrs f.b. 15 min + 30 sec./move
  • 10 2 x Time + Bonus (“Fischer”) 2 hrs, f.b. 1 hr f.b. 15 min + 30 sec./move
  • 11 2 x Time + Bonus (“Fischer”) 1 hrs, f.b. 30 hr f.b. 15 min + 30 sec./move
  • 12 Bonus (“Fischer”) blitz 3 min + 2 sec/move
  • 13 Bonus (“Fischer”) rapid 25 min + 10 sec/move
  • 14 Bonus (“Fischer”) slow 90 min + 30 sec/move
  • 15 Bonus tournament 90 min f.b. 15 min (all + 30sec./move)
  • 16 Bonus tournament 100 min f.b. 30 min (all + 30sec./move)
  • 17 Delay (“Bronstein”) 5 min + 3 sec./move free
  • 18 Delay (“Bronstein”) 25 min + 10 sec./move free
  • 19 Delay (“Bronstein”) 1 hr 55 min 5 sec/move free
  • 20 Delay (“US DELAY”) 5 min + 3 sec./move free
  • 21 Delay (“US DELAY”) 25 min + 10 sec./move free
  • 22 Delay (“US DELAY”) rapid 25 min + 10 sec/move
  • 23 Delay (“US DELAY”) slow 90 min + 30 sec/move
  • 24 Delay (“US DELAY”) tournament 90 min f.b. 15 min (all + 30sec./move)

  • 1 × Arduino UNO
  • 1 × ELEGOO UNO R3 2.8 Inches TFT

  • 1
    Download code from Github

    Download code from Github repository

    https://github.com/javagoza/ArduinoTFTChessClock

  • 2
    Step 2

    Change the preset modes as you want

    static const GameType games[24]  PROGMEM = {
      { FISCHER, 0, 1, {{ 300, 0}, {0,  0}, {0, 0}}},         // 01 Time blitz 5 min
      { FISCHER, 0, 1, {{1500, 0}, {0,  0}, {0, 0}}},         // 02 Time rapid 25 min
      { FISCHER, 0, 1, {{ 180, 0}, {0,  0}, {0, 0}}},         // 03 Time blitz 3 min
      { FISCHER, 0, 2, {{7200,40}, {1800, 0}, {0, 0}}},       // 04 Time + guillotine 2 hrs f.b. 30 min
      { FISCHER, 0, 2, {{3600,40}, {1800, 0}, {0, 0}}},       // 05 Time + guillotine  1 hrs f.b. 30 min
      { FISCHER, 0, 3, {{7200, 40}, {3600, 20}, {1800, 0}}},  // 06 2 x Time + guillotine 2 hrs f.b. 1 hr f.b. 30 min
      { FISCHER, 0, 3, {{7200, 40}, {7200, 20}, {1800, 0}}},  // 07 Time + repeating 2nd period 2 hours f.b. 1 hour (repeating)
      { FISCHER, 10, 2, {{1500,40}, {300, 20}, {0, 0}}},      // 08 Time + Bonus (“Fischer”) 25 min f.b. 5 min + 10 sec./move
      { FISCHER, 30, 2, {{7200, 40}, {900, 0}, {0, 0}}},      // 09 Time + Bonus (“Fischer”) 2 hrs f.b. 15 min + 30 sec./move
      { FISCHER, 30, 3, {{7200, 40}, {7200, 20}, {900, 0}}},  // 10 2 x Time + Bonus (“Fischer”) 2 hrs, f.b. 1 hr f.b. 15 min + 30 sec./move
      { FISCHER, 30, 3, {{3600, 40}, {3600, 20}, {900, 0}}},  // 11 2 x Time + Bonus (“Fischer”) 1 hrs, f.b. 30 hr f.b. 15 min + 30 sec./move 
      { FISCHER, 2, 1,  {{180, 0}, {0, 0}, {0, 0}}},          // 12 Bonus (“Fischer”) blitz 3 min + 2 sec/move
      { FISCHER, 10, 1, {{1500, 0}, {0, 0}, {0, 0}}},         // 13 Bonus (“Fischer”) rapid 25 min + 10 sec/move
      { FISCHER, 30, 1, {{180, 0}, {0, 0}, {0, 0}}},          // 14 Bonus (“Fischer”) slow 90 min + 30 sec/move
      { FISCHER, 30, 2, {{5400, 40}, {900, 0}, {0, 0}}},      // 15 Bonus tournament 90 min f.b. 15 min (all + 30sec./move)
      { FISCHER, 30, 2,    {{6000, 40}, {1800, 0}, {0, 0}}},  // 16 Bonus tournament 100 min f.b. 30 min (all + 30sec./move)
      { BRONSTEIN, 3, 1, {{300, 0}, {0, 0}, {0, 0}}},         // 17 Delay (“Bronstein”) 5 min + 3 sec./move free
      { BRONSTEIN, 10, 1, {{1500, 0}, {0, 0}, {0, 0}}},       // 18 Delay (“Bronstein”) 25 min + 10 sec./move free
      { BRONSTEIN, 5, 2, {{7200, 0}, {0, 0}, {0, 0}}},        // 19 Delay (“Bronstein”) 1 hr 55 min 5 sec/move free
      { DELAY, 3, 1, {{300, 0}, {0, 0}, {0, 0}}},             // 20 Delay (“US DELAY”) 5 min + 3 sec./move free
      { DELAY, 10, 1, {{1500, 0}, {0, 0}, {0, 0}}},           // 21 Delay (“US DELAY”) 25 min + 10 sec./move free
      { DELAY, 10, 1, {{1500, 0}, {0, 0}, {0, 0}}},           // 22 Delay (“US DELAY”) rapid 25 min + 10 sec/move
      { DELAY, 30, 1, {{180, 0}, {0, 0}, {0, 0}}},            // 23 Delay (“US DELAY”) slow 90 min + 30 sec/move
      { DELAY, 30, 2, {{5400, 40}, {900, 0}, {0, 0}}},        // 24 Delay (“US DELAY”) tournament 90 min f.b. 15 min (all + 30sec./move)
    };

    Clock modes structure 

    enum IncrementType { DELAY = 0, // Delay the player's clock starts after the delay period
                         BRONSTEIN, // Players receive the used portion of the increment at the end of each turn
                         FISCHER    // Players receive the full increment at the end of each turn, with increment 0 is BLIZT or GUILLOTINE
                       };
    
    struct StageType {
      long duration;
      int moves;
    };
    
    struct GameType {
      IncrementType incrementType;
      uint16_t incrementSeconds;
      uint16_t stagesNumber;
      StageType stages[3];
    };

View all instructions

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates