{"id":16731630,"url":"https://github.com/missinglink/twiddler","last_synced_at":"2025-06-29T18:02:54.956Z","repository":{"id":140480492,"uuid":"145421981","full_name":"missinglink/twiddler","owner":"missinglink","description":"hardware bit twiddling binary math toy","archived":false,"fork":false,"pushed_at":"2018-09-11T10:26:28.000Z","size":369,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-29T18:02:31.538Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","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/missinglink.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":"2018-08-20T13:34:37.000Z","updated_at":"2018-09-11T10:26:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"3777b3c3-9080-4333-a243-158f41563962","html_url":"https://github.com/missinglink/twiddler","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/missinglink/twiddler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/missinglink%2Ftwiddler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/missinglink%2Ftwiddler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/missinglink%2Ftwiddler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/missinglink%2Ftwiddler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/missinglink","download_url":"https://codeload.github.com/missinglink/twiddler/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/missinglink%2Ftwiddler/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262642931,"owners_count":23341815,"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":[],"created_at":"2024-10-12T23:38:13.718Z","updated_at":"2025-06-29T18:02:54.849Z","avatar_url":"https://github.com/missinglink.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Twiddler\n\nA bit-twiddler binary math toy :)\n\nTwiddler is a fun toy for learning `binary` (base 2) and `hexidecimal` (base 16) math.\n\nIt's intended as a learning tool for young \u0026 old, beginner through to pro.\n\nIt's particularly useful for computer programmers who often use different numerical bases in their code and would like a way to visualize them.\n\n## Motivation\n\nI really just wanted a tactile and visual tool for better understaning non-decimal number systems.\n\n## Twiddler overview\n\nThe device allows you to edit up to 4x 8-bit bytes. These bytes represent a single 32-bit unsigned integer.\n\nThe input buttons allow the you to interact with each byte, and to modify each individual bit within the currently selected byte.\n\nTwiddler has 4 display modes. These modes change which numerical base is used to display the state (`decimal`, `hexadecimal`, `binary` \u0026 the special `font` mode).\n\n## Paging\n\nThe rightmost byte is shown by default, a user can switch which byte is currently being viewed and edited.\n\n## Device overview\n\n![led_and_key](./assets/led_and_key.png)\n\n### LEDs\n\nAlong the top edge there are eight LEDs which display a binary representation of the currently selected byte.\n\nFor example, the binary number `101010101` would result in every second LED lighting up. For each `1` the light is on and for each `0` it is off.\n\n### Display\n\nThe display consists of 8x [seven-segment displays](https://en.wikipedia.org/Seven-segment_display), with a decimal indicator dot at the bottom right corner of each.\n\nThese displays can be used to represent numbers and letters, although representing English characters is fairly limited (eg. the letter `w`).\n\nIn the default `decimal` mode, the display will show a `decimal` (base 10) representation of your twiddle.\n\nThe dots at the bottom right corner of each display are used to indicate application state, such as the currently deleted mode and byte.\n\n### Buttons\n\nAlong the bottom edge of the device are 8x buttons. These buttons are used to interact with the device.\n\nWhen a single button is pressed and released, the corresponding bit will be toggled.\n\nFo example: pushing button `S2` will toggle corresponding bit, which will cause `LED2` to light up.\n\n### Multi-button combinations\n\nYou can hold a trigger button with one finger and then press a second button with another finger to trigger advanced actions on the device.\n\nFor example: holding button `S8` and then pushing button `S2` will change Twiddler in to `hexadecimal` mode.\n\nHere's a list of all the button combinations, `T` indicates the 'trigger button', you need to hold this button down first, then press and release the second button.\n\n| S1 | S2 | S3 | S4 | S5 | S6 | S7 | S8 | Action |\n| - | - | - | - | - | - | - | - | - |\n| o | | | | | | | T | Foo |\n\n\n## Hardware\n\n### Introduction to the TM1638\n\nCheck out this excellent intro to the TM1638 chip:\nhttp://tronixstuff.com/2012/03/11/arduino-and-tm1638-led-display-modules/\n\n### Wiring Diagrams\n\nYou can find wiring diagrams for both common models, along with info about wiring multiple in parallel here:\nhttps://github.com/zegreatclan/AssettoCorsaTools/wiki/Arduino-Tm1638-Display-Wiring\n\nWhen wiring your own twiddler you may need to change the pin assignments, at the top of the `src/twiddler.ino` file you'll find a configuration for which pins are attached to data, clock \u0026 strope. \n\n```ardunio\n// connect to TM1638 with data pin, clock pin, strobe pin\nTM1638 module(5, 6, 7);\n```\n\n## Software\n\n## TM1638 device driver\n\nTwiddler uses the device driver written by `rjbatista`, which can be found here:\nhttps://github.com/rjbatista/tm1638-library\n\nTwiddler was originally developed on a `Particle Core v1` chip, so I published the same library on the Particle registry:\n\n```bash\nparticle library search TM1638\n\u003e Found 1 library matching TM1638\nTM1638 1.0.0 [mine] 0 A library for interacting an arduino with a TM1638/TM1640\n```\n\n## Application code\n\nYou can find the source code for the Twiddler application in the `src` directory.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmissinglink%2Ftwiddler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmissinglink%2Ftwiddler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmissinglink%2Ftwiddler/lists"}