{"id":13580999,"url":"https://github.com/0xPIT/encoder","last_synced_at":"2025-04-06T06:32:24.468Z","repository":{"id":5609479,"uuid":"6816794","full_name":"0xPIT/encoder","owner":"0xPIT","description":"Atmel AVR C++ RotaryEncoder Implementation","archived":false,"fork":false,"pushed_at":"2023-09-11T07:47:29.000Z","size":20,"stargazers_count":309,"open_issues_count":21,"forks_count":162,"subscribers_count":39,"default_branch":"master","last_synced_at":"2024-11-05T20:46:47.927Z","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/0xPIT.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}},"created_at":"2012-11-22T17:30:09.000Z","updated_at":"2024-09-24T15:38:04.000Z","dependencies_parsed_at":"2022-09-22T03:41:05.780Z","dependency_job_id":"e3c1b397-5049-4749-a08e-e1824eb89d58","html_url":"https://github.com/0xPIT/encoder","commit_stats":{"total_commits":18,"total_committers":5,"mean_commits":3.6,"dds":0.2222222222222222,"last_synced_commit":"d6d5738fdf7bf3a8bb8ed8c6277580bf9f80b797"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xPIT%2Fencoder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xPIT%2Fencoder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xPIT%2Fencoder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xPIT%2Fencoder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0xPIT","download_url":"https://codeload.github.com/0xPIT/encoder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247445652,"owners_count":20939952,"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-08-01T15:01:57.139Z","updated_at":"2025-04-06T06:32:24.219Z","avatar_url":"https://github.com/0xPIT.png","language":"C++","funding_links":[],"categories":["C++"],"sub_categories":[],"readme":"ClickEncoder\n=============\n\n\u003e Arduino library to handle rotary encoders **with** buttons as a user input device.\nArduino RotaryEncoder with Button Implementation.\n\n\n- Timer-Based: Works on any IO-Pin.\n- Supports rotary acceleration, so when the encoder is rotated faster, the encoders value will increment faster\n- Button reports multiple states: `Clicked`, `DoubleClicked`, `Held` and `Released`\n\nEncoder and button can be connected to any input pin, as this library requires it's timer interrupt service routine ClickEncoder:service() to be called every millisecond. The example uses [TimerOne] for that.\n\nSee the example application [ClickEncoderTest] for details,\nor see it in action at my modified [reflow oven controller]\n\n### Encoder\nThe library supports **acceleration**, so when the encoder is rotated faster, the encoders value will increment faster.\n\nAcceleration can be enabled or disabled at runtine using `setAccelerationEnabled(bool)`.\n\nFor instance, it makes sense to disable acceleration when entering a configuration menu that will be navigated using the encoder.\n\n**Please note** that the acceleration parameters have been tuned for **1ms timer** intervals, and need to be changed if you decide to call the service method in another interval. (You'd need to increase ENC_ACCEL_INC and ENC_ACCEL_INC).\n\nDepending on the type of your encoder, you can define use the constructors parameter `stepsPerNotch` an set it to either `1`, `2` or `4` steps per notch, with `1` being the default.\n\nIf you have trouble with certain encoders, try \n\n    #define ENC_DECODER (1 \u003c\u003c 2)\n\nto use a table-based decoder, which can then be tuned using \n\n    #define ENC_HALFSTEP\n\nThe default is ENC_HALFSTEP 1.\n\n### Button\nThe Button reports multiple states: `Clicked`, `DoubleClicked`, `Held` and `Released`. You can fine-tune the timings in the library's header file.\n\nIf your encoder does not have a button, and you need to save program memory, use `#define WITHOUT_BUTTON 1`\nprior including `ClickEncoder.h`, and ignore the third parameter `BTN` of the constructor.\n\n\n[TimerOne]:http://playground.arduino.cc/Code/Timer1\n[Branch arduino]:https://github.com/0xPIT/encoder/tree/arduino\n[ClickEncoderTest]:https://github.com/0xPIT/encoder/blob/arduino/examples/ClickEncoderTest/ClickEncoderTest.ino\n[reflow oven controller]:https://github.com/0xPIT/reflowOvenController\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xPIT%2Fencoder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xPIT%2Fencoder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xPIT%2Fencoder/lists"}