{"id":18255760,"url":"https://github.com/synthead/timex_datalink_client","last_synced_at":"2025-04-07T15:11:14.520Z","repository":{"id":58640371,"uuid":"531622588","full_name":"synthead/timex_datalink_client","owner":"synthead","description":"Write data to Timex Datalink devices with an optical sensor","archived":false,"fork":false,"pushed_at":"2025-03-25T07:28:47.000Z","size":1008,"stargazers_count":37,"open_issues_count":6,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-31T14:12:06.666Z","etag":null,"topics":["150","150s","beepwear","data","data-link","datalink","dsi","e-brain","fl90","fl95","ironman","link","pro","royal","ruby","sync","timex","triathlon","upload","watch"],"latest_commit_sha":null,"homepage":"https://rubygems.org/gems/timex_datalink_client","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/synthead.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2022-09-01T17:35:03.000Z","updated_at":"2025-03-25T07:27:06.000Z","dependencies_parsed_at":"2025-03-15T23:20:38.965Z","dependency_job_id":null,"html_url":"https://github.com/synthead/timex_datalink_client","commit_stats":{"total_commits":522,"total_committers":1,"mean_commits":522.0,"dds":0.0,"last_synced_commit":"605aad00d34c40ee881f501d9b8f1d9702019f4f"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synthead%2Ftimex_datalink_client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synthead%2Ftimex_datalink_client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synthead%2Ftimex_datalink_client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synthead%2Ftimex_datalink_client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/synthead","download_url":"https://codeload.github.com/synthead/timex_datalink_client/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247675609,"owners_count":20977378,"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":["150","150s","beepwear","data","data-link","datalink","dsi","e-brain","fl90","fl95","ironman","link","pro","royal","ruby","sync","timex","triathlon","upload","watch"],"created_at":"2024-11-05T10:18:30.416Z","updated_at":"2025-04-07T15:11:14.500Z","avatar_url":"https://github.com/synthead.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Timex Datalink library for Ruby\n\nHere is a fully-tested, feature-complete, and byte-for-byte perfect reimplementation of all the various Timex Datalink\nclient software as a Ruby library!  This library supports every Datalink device manufactured, which includes protocols\n1, 3, 4, 6, 7, and 9!\n\nThese devices have been tested to work with this library:\n\n- Timex Datalink 50 (protocol 1)\n- Timex Datalink 70 (protocol 1)\n- Timex Datalink 150 (protocol 3)\n- Timex Datalink 150s (protocol 4)\n- Timex Ironman Triathlon (protocol 9)\n- Motorola Beepwear Pro (protocol 6)\n- Franklin Rolodex Flash PC Companion RFLS-8 (protocol 1)\n- Royal FL95 PC Organizer (protocol 1)\n- DSI e-BRAIN (protocol 7)\n\n## What is the Timex Datalink?\n\nThe Timex Datalink is a watch that was introduced in 1994 that is essentially a small PDA on your wrist.  The early\nmodels (supported by this software) have an optical sensor on the top of the face that receives data via visible light.\n\n\u003cimage src=\"https://user-images.githubusercontent.com/820984/209043607-a449b764-42f9-4f92-9a32-cd0665551289.jpg\" width=\"600px\"\u003e\n\nThe original data transfer method involves\n[drawing patterns of lines on a CRT monitor](https://www.youtube.com/watch?v=p3Pzxmq-JLM) for the watch to receive with\nits optical sensor.  CRTs use electron guns that draw scan lines one-by-one from top to bottom, then they return to the\ntop in preparation for the next frame.  This means that the electron guns turn on when they're drawing a white line, and\nand turn off when they're drawing the black background.  This produces flashing light as the graphics are drawn, which\nis ultimately received by the optical sensor and decoded by the Timex Datalink device.\n\nHave a CRT monitor?  Use this library with [timex\\_datalink\\_crt](https://github.com/synthead/timex_datalink_crt) to\ntransfer data with your CRT!\n\n\u003cimage src=\"https://user-images.githubusercontent.com/820984/188436622-8cac39c7-9edc-4d92-a8c7-cbe9774cb691.jpg\" width=\"600px\"\u003e\n\nFor laptop users, Timex also offered the Datalink Notebook Adapter.  Instead of using a CRT monitor, the Notebook\nAdapter simply flashed a single LED light.  This adapter is fully supported by the Timex Datalink software, and sends\nthe same data as a CRT.\n\n\u003cimage src=\"https://user-images.githubusercontent.com/820984/188438526-80752f6a-ef5d-42e9-bf46-e8b10a307a18.png\" width=\"600px\"\u003e\n\nThis library communicates with the Datalink Notebook Adapter to emit data to your Timex Datalink watch.  Don't have a\nNotebook Adapter?  [Use a Teensy LC instead](https://github.com/synthead/timex-datalink-arduino)!\n\n\u003cimage src=\"https://user-images.githubusercontent.com/820984/188439596-12b4ff61-7d52-4203-b439-740dbd094657.png\" width=\"600px\"\u003e\n\nAs a fun tidbit, these watches are flight certified by NASA and is one of four watches qualified by NASA for space\ntravel!  Here's a shot of James H. Newman wearing a Datalink watch on the Space Shuttle for STS-88!\n\n\u003cimage src=\"https://user-images.githubusercontent.com/820984/188442622-13ff7be5-4cf6-488e-936b-ca8874648467.png\" width=\"600px\"\u003e\n\nIn addition, the Datalink protocol is also used in some other watches, organizers, and toys, i.e. the Motorola Beepwear\nPro, Royal FL95, Tiger PDA2000, Franklin Rolodex Flash PC Companion RFLS-8, and DSI e-BRAIN 69006.\n\n## Installing Ruby and the timex\\_datalink\\_client gem\n\nIf you need to install Ruby, follow the\n[Ruby installation instructions](https://www.ruby-lang.org/en/documentation/installation) first.  The oldest supported\nversion is 3.1.0, so make sure to have Ruby 3.1.0 or greater installed.\n\nThen, with Ruby installed, run this command to install the timex\\_datalink\\_client gem:\n\n```shell\ngem install timex_datalink_client\n```\n\nYou're done!  From here, continue reading the documentation for which protocol to use and follow the code examples below.\n\n## Determining the protocol to use\n\nOn Timex Datalink watches, press the MODE button until \"COMM MODE\" is displayed.  \"COMM READY\" will appear.  This is\nsometimes accompanied by a version number.  Use the table below to identify the protocol.\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003cth\u003eWatch display\u003c/th\u003e\n    \u003cth\u003eProtocol compatibility\u003c/th\u003e\n  \u003c/tr\u003e\n\n  \u003ctr\u003e\n    \u003ctd\u003e\n      \u003cimage src=\"https://user-images.githubusercontent.com/820984/189607899-5bb67438-1c82-41e0-95d1-d1134cfb1f8b.png\"\u003e\n    \u003c/td\u003e\n    \u003ctd\u003eUse protocol 1 models in \u003ccode\u003eTimexDatalinkClient::Protocol1\u003c/code\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\n  \u003ctr\u003e\n    \u003ctd\u003e\n      \u003cimage src=\"https://user-images.githubusercontent.com/820984/189609399-25eea5c5-958e-489d-936e-139342c9fddf.png\"\u003e\n    \u003c/td\u003e\n    \u003ctd\u003eUse protocol 3 models in \u003ccode\u003eTimexDatalinkClient::Protocol3\u003c/code\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\n  \u003ctr\u003e\n    \u003ctd\u003e\n      \u003cimage src=\"https://user-images.githubusercontent.com/820984/189609671-33a6dc6b-1eb1-4942-8bac-238e6056d1c2.png\"\u003e\n    \u003c/td\u003e\n    \u003ctd\u003eUse protocol 4 models in \u003ccode\u003eTimexDatalinkClient::Protocol4\u003c/code\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\n  \u003ctr\u003e\n    \u003ctd\u003e\n      \u003cimage src=\"https://user-images.githubusercontent.com/820984/190122029-6df17bd0-171a-425c-ac63-d415eeb9fffd.png\"\u003e\n    \u003c/td\u003e\n    \u003ctd\u003eUse protocol 9 models in \u003ccode\u003eTimexDatalinkClient::Protocol9\u003c/code\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\n  \u003ctr\u003e\n    \u003ctd\u003e\n      \u003cimage src=\"https://user-images.githubusercontent.com/820984/190326340-3ffba239-ea9e-4595-83ae-c261be284a30.png\"\u003e\n    \u003c/td\u003e\n    \u003ctd\u003eUse protocol 6 models in \u003ccode\u003eTimexDatalinkClient::Protocol6\u003c/code\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\nDuring data transmission, the \"start\" packet of each protocol will announce the protocol number to the device.  If the\nprotocol doesn't match the device, the screen will display \"PC-WATCH MISMATCH\" and safely abort the data transmission.\n\nMost non-Timex devices use protocol 1, so start with protocol 1 if the protocol can't be identified.\n\n## Protocol documentation\n\nEach protocol is individually documented with their own code examples:\n\n- [Using TimexDatalinkClient with Protocol 1](docs/timex_datalink_protocol_1.md) (Timex Datalink 50 \u0026 70, various PDAs)\n- [Using TimexDatalinkClient with Protocol 3](docs/timex_datalink_protocol_3.md) (Timex Datalink 150)\n- [Using TimexDatalinkClient with Protocol 4](docs/timex_datalink_protocol_4.md) (Timex Datalink 150s)\n- [Using TimexDatalinkClient with Protocol 6](docs/motorola_beepwear_pro_protocol_6.md) (Motorola Beepwear Pro)\n- [Using TimexDatalinkClient with Protocol 7](docs/dsi_ebrain_protocol_7.md) (DSI e-BRAIN)\n- [Using TimexDatalinkClient with Protocol 9](docs/timex_ironman_triathlon_protocol_9.md) (Timex Ironman Triathlon)\n\n## Tuning data transfer performance\n\nAfter every byte is sent to the watch, a small delay is necessary before advancing to the next byte.  This gives the\nwatch time to decode and store the incoming data.  In addition, an additional delay is necessary after sending a packet\nof data (bytes that represent a piece of data, i.e. an alarm).\n\nThe byte and packet sleep time defaults to the same rate of the Timex Datalink software for parity.  This is 0.025\nseconds per byte, and 0.25 seconds per packet.  These two sleep times can be tuned with the `byte_sleep` and\n`packet_sleep` keywords when creating a `TimexDatalinkClient` instance.\n\nIn practice, much smaller values can be used for a much higher data rate.  In testing, these values seem to work\nreliably with the [Teensy LC Notebook Adapter](https://github.com/synthead/timex-datalink-arduino):\n\n```ruby\ntimex_datalink_client = TimexDatalinkClient.new(\n  serial_device: \"/dev/ttyACM0\",\n  models: models,\n  byte_sleep: 0.008,\n  packet_sleep: 0.06,\n  verbose: true\n)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsynthead%2Ftimex_datalink_client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsynthead%2Ftimex_datalink_client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsynthead%2Ftimex_datalink_client/lists"}