{"id":21547569,"url":"https://github.com/zabackary/open-chess-clock","last_synced_at":"2025-03-18T01:46:23.165Z","repository":{"id":205073917,"uuid":"712155518","full_name":"zabackary/open-chess-clock","owner":"zabackary","description":"An open source chess clock using an HD44780-compatible LCD and some buttons","archived":false,"fork":false,"pushed_at":"2024-10-05T11:16:52.000Z","size":256,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-24T09:25:29.682Z","etag":null,"topics":["chess","chess-clock","embedded","frontend","rust","web","webserial"],"latest_commit_sha":null,"homepage":"https://zabackary.github.io/open-chess-clock/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zabackary.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-30T22:50:24.000Z","updated_at":"2024-10-05T11:16:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"0cc5e128-5a72-4a97-9dc7-b8328f5074e0","html_url":"https://github.com/zabackary/open-chess-clock","commit_stats":null,"previous_names":["zabackary/open-chess-clock"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zabackary%2Fopen-chess-clock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zabackary%2Fopen-chess-clock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zabackary%2Fopen-chess-clock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zabackary%2Fopen-chess-clock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zabackary","download_url":"https://codeload.github.com/zabackary/open-chess-clock/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244141582,"owners_count":20404835,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chess","chess-clock","embedded","frontend","rust","web","webserial"],"created_at":"2024-11-24T06:15:32.387Z","updated_at":"2025-03-18T01:46:23.144Z","avatar_url":"https://github.com/zabackary.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenChessClock\n\nA simple chess clock for the _Arduino Uno_ (specifically the r3, though it\nprobably doesn't matter) that, since it uses `embedded-hal`, can easily be\nadapted for other platforms. Basically, it has an up/P1 button, a down/P2\nbutton, and a start/stop/select button for configuration.\n\n\u003e [!NOTE]\n\u003e On my Arduino Uno r3, there is about a half-second drift per minute of\n\u003e runtime compared to my computer clock.\n\nOpenChessClock even has a web interface for when you want the time to be even\nbigger! Find out more in [`/www`](/www). It connects to the clock over WebSerial\nand shows the time, or can operate independently if needed. Screenshots are\nbelow.\n\n## Pictures and Screenshots\n\n![openchessclock-real](https://github.com/zabackary/open-chess-clock/assets/137591653/dd571ff2-32ce-47e8-b64f-7c51153bbb39)\n![openchessclock-web](./www/assets/sync.png)\n\n## Instructions for use (after set-up)\n\nHow do I use this chess clock?\n\n1. Boot the chess clock by plugging it in. It should show a version number and a\n   splash screen.\n2. Select the time using the UP and DOWN buttons. Press START to move the cursor\n   from the P1 minute/hour selector to the P1 second selector, etc.\n3. On the screen saying `P1/P2 to begin`, press the button corresponding to the\n   player who will play first. For example, if P1 is White, they should press\n   their button.\n4. When players are done with their turn, they should push their button.\n   Continuing from the previous example, when White makes their move, they\n   should press the P1 button.\n5. If the game needs to be paused at any time, press the START button. To\n   unpause, press the the P1 or P2 buttons depending on who is going next with\n   the same schematics as the start screen.\n6. When the game is over (the buzzer will sound one long beep if it's\n   connected), press START to go back to the time selection screen.\n\n## States\n\nState diagram\n\n```\n                                      .----------------.\n                                      |                |\n                                      v                | UP/DN\n┌--------┐     ┌----------┐ ST  ┌-----------┐ ST  ┌-------┐\n| Splash | --\u003e | Time set | --\u003e | Countdown | --\u003e | Pause |\n└--------┘     └----------┘     └-----------┘     └-------┘\n                   ^  ^               | (finish)      | ST\n                   |  |               |               |\n                   |  `---------------|---------------'\n                   |                  |\n                   |                  v\n                   |        ST ┌------------┐\n                   `---------- | Win screen |\n                               └------------┘\n```\n\nTime set ([`time_set.rs`](./src/time_set.rs)):\n\n```\nP1  Set time  P2\n0:00:00  0:00:00\n```\n\nPause ([`pause.rs`](./src/pause.rs)):\n\n```\nP1  \u003ePaused\u003c  P2\n0:00:00  0:00:00\n```\n\nTop line alternates between `P1 Paused P2`, `START to restart`, and\n`P1/P2 to resume `.\n\nCountdown ([`countdown.rs`](./src/countdown.rs)):\n\n```\n[P1]   \u003c\u003c    P2\n0:00:00  0:00:00\n```\n\nFinish ([`finish.rs`](./src/finish.rs))\n\n```\n[P1]  Time's up!\n0:00:00  0:00:05\n```\n\nor\n\n```\nTime's up!  [P2]\n0:00:05  0:00:00\n```\n\n## Hardware connections\n\n1. **LCD**  \n   LCD RS =\u003e Arduino d7 (register select)  \n   LCD EN =\u003e Arduino d8 (enable)  \n   LCD d4 =\u003e Arduino d9  \n   LCD d5 =\u003e Arduino d10  \n   LCD d6 =\u003e Arduino d11  \n   LCD d7 =\u003e Arduino d12  \n   The LCD backlight cathode and anode should be connected, and the contrast\n   should be set to an appropriate amount using a pot. Of course, make sure the\n   LCD has 5V power (unlike me, who attached it to 2.7V and spent an hour trying\n   to fix it).\n2. **Buttons**  \n   Down button =\u003e Arduino d2 \u0026 GND (also functions as P1 button)  \n   Start button =\u003e Arduino d3 \u0026 GND  \n   Up button =\u003e Arduino d4 \u0026 GND (also functions as P2 button)\n3. **Buzzer** (optional)  \n   Buzzer anode =\u003e Arduino d6\n\n## Build Instructions\n\n1. Install prerequisites as described in the [`avr-hal` README] (`avr-gcc`,\n   `avr-libc`, `avrdude`, [`ravedude`]).\n\n2. Run `cargo build` to build the firmware.\n\n3. Run `cargo run` to flash the firmware to a connected board. If `ravedude`\n   fails to detect your board, check its documentation at\n   \u003chttps://crates.io/crates/ravedude\u003e.\n\n4. `ravedude` will open a console session after flashing where you can interact\n   with the UART console of your board.\n\n[`avr-hal` README]: https://github.com/Rahix/avr-hal#readme\n[`ravedude`]: https://crates.io/crates/ravedude\n\n## License\n\nLicensed under either of\n\n- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or\n  \u003chttps://www.apache.org/licenses/LICENSE-2.0\u003e)\n- MIT license ([LICENSE-MIT](LICENSE-MIT) or\n  \u003chttps://opensource.org/licenses/MIT\u003e)\n\nat your option.\n\n## Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in the work by you, as defined in the Apache-2.0 license, shall be\ndual licensed as above, without any additional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzabackary%2Fopen-chess-clock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzabackary%2Fopen-chess-clock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzabackary%2Fopen-chess-clock/lists"}