Project Repository - Shareware Firmware for Configurable Dominator: Domination Timer firmware
If you are interested in firmware for the Configurable DOMINATOR in machine code (.hex), contact me:
Arduino LCD Rotary Encoder Stopwatch Schematics Button Menu Paintball Domination Timer

Configurable Domination Timer - stopwatch for Airsoft | Paintball

Entities in the project configurable Domination Timer:

Team RED - user entry button - Domination Timer
Team RED
Referee - a combination of both buttons stops the time
Referee / STOP
Team GRE - user entry button - Domination Timer
Team GRE

Project description - Configurable Domination Timer:

Domination Timer is a device - a stopwatch for sports such as Airsoft, Paintball, which allow you to measure the time of occupying a point with a resolution of seconds. The stopwatch is equipped with a 16x2 / 20x4 LCD character display. After switching on the device, it is possible to switch between menu items on the display using the rotary encoder - KY-040. Through the items, it is possible to start the Domination Timer game mode, which responds to user buttons (inputs), or it is possible to set the time of team occupancy before the game in the configurable mode. This parameter represents the required length of holding the button until the team successfully occupies the point. This configurable parameter is implemented for the number of seconds. The second configurable parameter is the automatic end of the game to reach a certain number of hours of the stopwatch with the UNLIMITED option - when the stopwatch counts to infinity, or after the maximum display time on the display - 99 hours, 59 minutes, 59 seconds. Stopwatch is using Arduino microcontroller (with AtMega chip) or a it can use that chip stadalone. Chip controls whole Domination Timer settings, logic of stopwatch etc. There are 2 teams in the game - RED team and GRE team, which play against each other and occupy the imaginary point that is formed by this device - Domination Timer. At the beginning of the game, the display shows the times 00 hours, 00 minutes, 00 seconds for RED team, GRE team.

Konfigurovateľný DOMINATOR - výber konfigurovateľného parametra Konfigurovateľný DOMINATOR - menu pre nastavenie maximálnej dĺžky hry

Button Domination Timer uses button input for the action of occupying a point by a team member, as well as for input of a referee entity. Thus, a total of 2 buttons for 3 system entities, the switching buttons connected in the INPUT_PULLUP mode are used. Pressing the button feeds the GND signal to the Arduino digital input terminal (Active-LOW switching signal). Switch buttons are used, not switch buttons (they would not react to the system logic, all software would always be "pressed"). The configurable Domination Timer responds to the length of the press, which is set in the configuration menu via an encoder. It is required to hold the button for a given time. The system does not respond to short presses. In the extended version, it is also possible to set point neutralization (stopping the time of the active team at the point if a member of the other team holds the button at least 50% of the required time) The times are displayed on an LCD character display measuring 16x2 or 20x4, which communicates with the control microcontroller via the I2C bus. If a team member of the RED team occupies a point by pressing a button, a buzzer is launched, which announces a change in the point with a short beep. Then the RED team's LED at this station will light up and the display will start adding time for that team.

If the point is occupied by the GRE team and the team member presses the appropriate button, the buzzer sounds again, the GRE team LED lights up, the RED time is paused and the time of the GRE team that occupied the point is counted. The referee must stop both buttons at the same time to stop both times. Times are stopped until the point is reoccupied by some of the teams in the system This type of input is thus suitable for starting a break, but it can also end the game for its evaluation. In the case of the COUNTDOWN game mode, the combination of both buttons is intended to stop the countdown time! The new game is implemented by resetting the entire Arduino board via the RST button, or by disconnecting and reconnecting the power supply. In the menu it is also possible to configure the activity / inactivity of the buzzer, which can also be included in the game. Domination Timer game mode uses a buzzer to announce the current occupation of a point. Eraser does not exist in this type of Domination Timer. A second game can be implemented in the system - countdown, which allows you to set a minute countdown while it must be stopped. The player stops the countdown by holding both buttons for a certain time (based on the configuration menu for the length of pressing from Domination Timer).

LCD 20x4 output for DOMINATION game-mode:

LCD character display 20x4 - Arduino Domination Timer - DOMINATOR

LCD 20x4 output for COUNTDOWN game-mode:

LCD character display 20x4 - Arduino Domination Timer - COUNTDOWN

Compatible control hardware - Configurable Domination Timer:

Compatible peripherals - Configurable Domination Timer:

Wiring diagram - Configurable Domination Timer

Configurable Domination Timer - schematics

Configurable Domination Timer - game mode DOMINATION

Configurable Domination Timer for Airsoft, Paintball

Wiring - Configurable Domination Timer - fully corresponds to the wiring diagram:

Arduino Uno / Nano (ATmega328P) I2C converter for LCD display
5V Vcc
A4 (Hardware SDA) SDA
A5 (Hardware SCL) SCL
Arduino Uno / Nano (ATmega328P) Rotary encoder - KY-040
5V +
Arduino Uno / Nano (ATmega328P) LED diodes
Arduino Uno / Nano (ATmega328P) Pushbuttons (INPUT_PULLUP)
Arduino Uno / Nano (ATmega328P) Buzzer
D10 IO

Test program (Shareware) - Configurable Domination Timer

Shareware version (.hex) available for Configurable Domination Timer project.The version allows you to measure a maximum of 60 seconds for each team. When this time is reached, the stopwatch stops. The goal of the version is to verify compatibility with your hardware. Machine codes based on the I2C address of the converter for the LCD display are available in the Github repository. The most used addresses are 0x27 and 0x3F. If you do not know the address of your converter, use the built-in example in Arduino IDE -> I2C Scanner, which will write the address to the UART interface (Serial monitor). Machine code can be uploaded to the Arduino Uno microcontroller via the AVRDUDE software - part of the Arduino IDE, or with a GUI interface via the XLoader - easier to use.

  • AVRDUDE must be run via the CMD (command line) installed with the Arduino IDE. Located in C:/Users/User/Documents/ArduinoData/packages/arduino/tools/avrdude/6.X.X-arduino/bin
  • Sample command for uploading a program to Arduino Uno / Nano (ATmega328P):
  • For firmware with I2C display address 0x27 (example COM port 21 and 115200 baud / s): avrdude -CC: avrdude.conf -v -patmega328p -carduino -PCOM21 -b115200 -D -Uflash:w:encoder_0x27.ino.hex:i
  • For firmware with I2C display address 0x3F (example COM port 21 and 115200 baud / s):avrdude -CC: avrdude.conf -v -patmega328p -carduino -PCOM21 -b115200 -D -Uflash:w:encoder_0x3F.ino.hex:i
  • XLoader is a Windows application (executable .exe tool) with a simple graphical interface, which allows the selection of firmware - machine code (.hex), the target platform and can dynamically show the COM port on which the device is located.
  • By simply clicking on Upload, the machine code can be uploaded automatically (XLoader uses the AVRDUDE tool similar to the Arduino IDE). The XLoader window informs about the successful upload in the form of a list of the number of bytes uploaded.
  • If you are using Arduino Nano with OLD Bootloader, you ned to use upload speed 57600 baud/s and not standard value 115200 baud/s!
  • The firmware can be downloaded from the repository: HERE. The firmware is in the /firmware/encoder_dominator folder divided according to the address of the I2C converter (you found out from the I2C scanner output on the UART interface).

    Available firmware - Shareware for Configurable Domination Timer

    Firmware name (in folder encoder_dominator) Designed for Download
    encoder_0x27.ino.hex LCD character display size 16x2 or 20x4 with I2C converter, which communicates at address 0x27. Download firmware
    encoder_0x3F.ino.hex LCD character display size 16x2 or 20x4 with I2C converter, which communicates at address 0x3F. Download firmware

    I2C Scanner - a program for reading the address of the I2C converter for the LCD display

    Expected output of I2C Scanner:

    Výpis I2C adresy, na ktorej komunikuje I2C prevodník pre displej 16x2 / 20x4

    The Wire library is built into the Arduino IDE, no installation is required. The program can be compiled and verified communication via I2C bus with LCD character display. I2C converter should be connected to Arduino to hardware I2C outlets (SCL to A5, SDA to A4) before loading the program, it is enough even without display. The retrieved display address must be provided for a successful build for Arduino along with the UID of the RFID cards.

    #include <Wire.h>
    void setup()
      while (!Serial);             // Leonardo: wait for serial monitor
      Serial.println("\nI2C Scanner");
    void loop()
      byte error, address;
      int nDevices;
      nDevices = 0;
      for(address = 1; address < 127; address++ )
        // The i2c_scanner uses the return value of
        // the Write.endTransmisstion to see if
        // a device did acknowledge to the address.
        error = Wire.endTransmission();
        if (error == 0)
          Serial.print("I2C device found at address 0x");
          if (address < 16)
          Serial.println("  !");
        else if (error==4)
          Serial.print("Unknown error at address 0x");
          if (address < 16)
      if (nDevices == 0)
        Serial.println("No I2C devices found\n");
      delay(5000);           // wait 5 seconds for next scan