{"id":17465426,"url":"https://github.com/suhlig/wordclock","last_synced_at":"2025-04-19T20:25:39.728Z","repository":{"id":14940678,"uuid":"77339651","full_name":"suhlig/wordclock","owner":"suhlig","description":"A Word Clock in Ruby","archived":false,"fork":false,"pushed_at":"2024-06-09T17:21:11.000Z","size":448,"stargazers_count":6,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-18T19:14:33.987Z","etag":null,"topics":["academic","clock","raspberry-pi","ruby","word-clock"],"latest_commit_sha":null,"homepage":"","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/suhlig.png","metadata":{"files":{"readme":"README.markdown","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":"2016-12-25T19:25:51.000Z","updated_at":"2024-06-09T17:21:14.000Z","dependencies_parsed_at":"2024-05-30T10:28:12.668Z","dependency_job_id":null,"html_url":"https://github.com/suhlig/wordclock","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suhlig%2Fwordclock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suhlig%2Fwordclock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suhlig%2Fwordclock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suhlig%2Fwordclock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/suhlig","download_url":"https://codeload.github.com/suhlig/wordclock/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249793602,"owners_count":21326566,"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":["academic","clock","raspberry-pi","ruby","word-clock"],"created_at":"2024-10-18T11:42:41.315Z","updated_at":"2025-04-19T20:25:39.700Z","avatar_url":"https://github.com/suhlig.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ruby Word Clock\n\n[![Build Status](https://app.travis-ci.com/suhlig/wordclock.svg?branch=master)](https://app.travis-ci.com/suhlig/wordclock)\n\n![Front](doc/front.jpg) ![Back](doc/back.jpg)\n\nThis is an implementation of a [Word Clock](http://www.instructables.com/id/Wordclock/) in Ruby. It maps every point in time between midnight and 23:59 hours to a sentence, which is represented as positions of pixels to light up. The current implementation uses German words.\n\nThe LEDs are driven by a [Fadecandy](https://github.com/scanlime/fadecandy) board using [faderuby](https://github.com/JamesHarrison/faderuby).\n\nThe hardware setup was largely inspired by the [WordClock mit WS2812](https://www.mikrocontroller.net/articles/WordClock_mit_WS2812) article at [mikrocontroller.net](https://www.mikrocontroller.net/). It uses it's [24 hours version](https://www.mikrocontroller.net/wikifiles/1/12/WordClock24h-Frontplatte-800x800.png) as character table.\n\n# LED Indices\n\nThe following table shows the positions for a single, continuous strip of LEDs. Read from top to bottom, with the MSB in the top row:\n\n```\n                                                                                                    1         1         1         1         1         1         1         1         1         1         2         2         2         2         2         2         2         2         2\n          1         2         3         4         5         6         7         8         9         0         1         2         3         4         5         6         7         8         9         0         1         2         3         4         5         6         7         8\n012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567\nESAISTOVIERTELEINSDREINERSECHSIEBENEELFÜNFNEUNVIERACHTNULLZWEINZWÖLFZEHNUNDOZWANZIGVIERZIGDREISSIGFÜNFZIGUHRMINUTENIVORUNDNACHEINDREIVIERTELHALBSIEBENEUNULLZWEINEFÜNFSECHSNACHTVIERDREINSUNDAELFEZEHNZWANZIGGRADREISSIGVIERZIGZWÖLFÜNFZIGMINUTENUHREFRÜHVORABENDSMITTERNACHTSMORGENSWARMMITTAGS\n```\n\n# Development\n\nThis is a regular Ruby project, i.e. after cloning the project, the usual\n\n```bash\n$ bundle install\n$ bundle exec rake\n```\n\nwill get you started with running the tests.\n\nFor further investigation, there is also a terminal simulator that shows a text version of the clock in action:\n\n  ```bash\n  $ bundle exec exe/wordclock-simulator \"12.11.2017 17:23\"\n  ```\n\n  ![17:23](doc/simulator_1723.png)\n\nIt's even prettier when the party mode is enabled (e.g. on Shrove Tuesday):\n\n  ```bash\n  $ bundle exec exe/wordclock-simulator \"28.2.2017 23:59\"\n  ```\n\n  ![Party Mode](doc/simulator_party-mode.png)\n\n# Deployment\n\nSee [deployment](deployment/README.markdown) for details.\n\n# Troubleshooting the WS2811B LEDs\n\n## Wiring\n\nI accidentally killed a number of LEDs with a ground loop because the Raspberry Pi and the soldering iron were connected to different wall sockets.\n\nTo find out whether an LED is dead, someone in [the forum](https://www.mikrocontroller.net/topic/385955) recommended to measure the resistance between `DATA` and `GND`:\n\n* If the resistance is between 2 and 15 MΩ, the LED is ok.\n* If the resistance is ∞, the LED is dead.\n\nSince then, this is my safety procedure when soldering LEDs:\n\n1. Connect `GND` of soldering iron to `GND` of the LED strip to be soldered\n1. Connect `GND` of power supply to `GND` of the LED strip to be soldered\n1. Solder black wire to `GND` of LED strip\n1. Solder red wire to `+5V` of LED strip\n1. Connect `GND` of Fadecandy to LED strip\n1. Connect `DATA` of Fadecandy to LED strip\n1. Connect Fadecandy to USB\n1. Connect `+5V` of power supply to LED strip\n1. Start test\n\n## Software Tests\n\n* `fadecandy` comes with a number of useful examples that can exercise a number of LEDs:\n\n  ```bash\n  $ cd ~/workspace/fadecandy/examples/perl\n  $ ./random.pl; ./turnthemoff.pl\n  ```\n\n  Having `random.pl` and `turnthemoff.pl` in one line ensures that all LEDs are turned off when `random.pl` is interrupted.\n\n* Tailing the log file\n\n  Assuming that `wordclock` is the host, the following will tail entries related to  `fcserver` from the system journal:\n\n  ```bash\n  ssh wordclock sudo journalctl -u fcserver -f\n  ```\n\n  Once a client connects, it will show a line similar to this:\n\n  ```\n  Dec 17 18:07:52 wordclock fcserver[684]: [1481994472:2735] NOTICE: New Open Pixel Control connection\n  ```\n\n# Bill of Materials\n\n## Electronics Parts\n\n| Component |   Price |\n| :-------- | ------: |\n| [300 WS2811B LEDs](https://www.ebay.de/itm/222192610445) | 33,21 € |\n| [Adafruit FadeCandy](http://www.exp-tech.de/adafruit-fadecandy-dithering-usb-controlled-driver-for-neopixels) Dithering USB-Controlled Driver for NeoPixels | 28,45 € |\n| [Raspberry Pi 3 Model B](https://www.amazon.de/dp/B01CEFWQFA/) | 34,99 € |\n| [SanDisk Ultra Android microSDHC 16GB](https://www.amazon.de/dp/B013UDL5V6/) | 7,99 € |\n| [MeanWell LED-Netzteil 5V](https://www.ebay.de/itm/310840219652) | 37,00 € |\n| [Kabel USB 2.0 Micro B Stecker auf 2x offene Kabelenden](https://www.amazon.de/dp/B01A9GLG6Q/) | 1,49 € |\n\n## Mechanical Parts\n\n| Component |   Price |\n| :-------- | ------: |\n| [Back plane](https://www.ebay.de/itm/301477115708) for mouting the LEDs | 7,88 € |\n| [Front plane](https://www.mikrocontroller.net/articles/WordClock_mit_WS2812#WC24h_Sammelbestellung_Frontplatten) |  54,00 € |\n| [Mounting plane](https://www.mikrocontroller.net/articles/WordClock_mit_WS2812#WC24h_Sammelbestellung_Zwischenb.C3.B6den) | 59,50 € |\n| [Picture frame](https://www.alutech.de/alu---zuschnitt-profil-18.html) (incl. mounting set) | 42,48 € |\n| [Cable box](https://www.amazon.de/dp/B01C6V7OP4/) | 12,99 € |\n\nAll prices as of Sept. 2016 incl. S\u0026H.\n\n# Icons\n\n* X-Mas tree from https://grammio.com/static/images/emoji/D83CDF84.png\n\n# Switch to SSD (USB)\n\nhttps://forums.raspberrypi.com/viewtopic.php?t=196778\n\n## Benchmarks\n\nhttps://jamesachambers.com/raspberry-pi-storage-benchmarks-2019-benchmarking-script/\n\n* before:\n\n  Raspberry Pi 3 with Kingston - Model: SD32G\n\n  Running HDParm tests ...\n\n      Category                  Test                      Result\n  HDParm                    Disk Read                 20.87 MB/s\n  HDParm                    Cached Disk Read          20.71 MB/s\n  DD                        Disk Write                17.1 MB/s\n  FIO                       4k random read            1775 IOPS (7103 KB/s)\n  FIO                       4k random write           93 IOPS (375 KB/s)\n  IOZone                    4k read                   5818 KB/s\n  IOZone                    4k write                  1093 KB/s\n  IOZone                    4k random read            6255 KB/s\n  IOZone                    4k random write           599 KB/s\n\n                            Score: 634\n  ```\n\n* after:\n\n  Raspberry Pi 3 with SanDisk Extreme PRO USB 3.2 SSD 128 GB\n\n  ```\n      Category                  Test                      Result\n  HDParm                    Disk Read                 34.49 MB/s\n  HDParm                    Cached Disk Read          33.90 MB/s\n  DD                        Disk Write                32.1 MB/s\n  FIO                       4k random read            1985 IOPS (7941 KB/s)\n  FIO                       4k random write           2581 IOPS (10327 KB/s)\n  IOZone                    4k read                   11261 KB/s\n  IOZone                    4k write                  10129 KB/s\n  IOZone                    4k random read            7718 KB/s\n  IOZone                    4k random write           10143 KB/s\n\n                            Score: 2203\n  ```\n\nNot as impressive as I had hoped, but it's likely due to the Raspberry Pi 3 having only USB-2.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuhlig%2Fwordclock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuhlig%2Fwordclock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuhlig%2Fwordclock/lists"}