{"id":26741126,"url":"https://github.com/dob9601/qmk-oled-api","last_synced_at":"2025-04-14T17:00:26.918Z","repository":{"id":53866100,"uuid":"519510081","full_name":"dob9601/qmk-oled-api","owner":"dob9601","description":"A wrapper around the HID API that makes it significantly easier to draw graphics to a QMK keyboard's OLED display","archived":false,"fork":false,"pushed_at":"2023-10-31T21:23:32.000Z","size":460,"stargazers_count":13,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T05:32:15.132Z","etag":null,"topics":["keyboard","oled-display","qmk","split-keyboard"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dob9601.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-07-30T12:25:38.000Z","updated_at":"2025-02-05T15:53:55.000Z","dependencies_parsed_at":"2025-03-28T05:42:07.720Z","dependency_job_id":null,"html_url":"https://github.com/dob9601/qmk-oled-api","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/dob9601%2Fqmk-oled-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dob9601%2Fqmk-oled-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dob9601%2Fqmk-oled-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dob9601%2Fqmk-oled-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dob9601","download_url":"https://codeload.github.com/dob9601/qmk-oled-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248923721,"owners_count":21183951,"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":["keyboard","oled-display","qmk","split-keyboard"],"created_at":"2025-03-28T05:32:00.428Z","updated_at":"2025-04-14T17:00:26.874Z","avatar_url":"https://github.com/dob9601.png","language":"Rust","funding_links":["https://ko-fi.com/A0A1EB7YD"],"categories":[],"sub_categories":[],"readme":"[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/A0A1EB7YD)\n\n# ![QMK Oled API](https://user-images.githubusercontent.com/24723950/183790643-aa12642c-0f83-4545-844e-621f3601720d.png)\n\nDrawing graphics on a QMK Oled screen is harder than it should be! This project hopes to resolve that.\n\nThis crate provides an API for drawing to the OLED screen on your QMK keyboard, along with a small snippet required to turn your keyboard into a client for it.\n\n## Showcase\n\nBelow are some projects that have been built on top of this API:\n\n- [qmk-nowplaying](https://github.com/dob9601/qmk-nowplaying)\n\n## Gif Example\nhttps://user-images.githubusercontent.com/24723950/198413942-76ffc483-ebfd-46a0-91fa-2411973d8280.mp4\n\n## Client Snippet\n\nBelow is a snippet of config you can use to turn your keyboard into a client:\n```c\n#include \"raw_hid.h\"\n#include \"print.h\"\n\n#include \"string.h\"\n\n// What the screen look like if no connection is established. This shows a \"No connection\" message\nchar current_screen[] = {\n    0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 56, 68,  4,  4,  4,  4,  4, 68, 56,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,128,128,  0, 48,248,240,224,128,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,\n    0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 78, 81, 81, 81, 81, 81,206,  0,  0,  0,  0,  0,  0,  0,  0,136,200,200,136,168,168,152,152,136,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,129,195,  6, 12,156, 56,112,195,135,255,254,252,192,  3, 31,255,254,240,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, \n    0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 20, 20, 20, 20, 20, 20,243,  0,  0,  0,  0,  0,  0,  0,  0, 28, 34, 34, 34, 34, 34, 28,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  3,  0,  8, 31, 31, 14,192,241,243,103, 15, 31, 48,120,255,255, 15,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, \n    0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 25, 25,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  1,  0, 14, 31, 15,  6,  0,  1,  3,  6,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,\n};\n\n/*\n * Payload structure. Index identifies where on the OLED to write to. \n * Report IDs aren't used but cause a pain (not writing, occasionally being stripped off etc.)\n * For this reason, the first byte should always be \"1\"\n * |  1  | 2 | 3 --------- 32 |\n * |REPID|IDX|     DATA       |\n */\nstatic const int PAYLOAD_SIZE = 32;\n\nvoid raw_hid_receive(uint8_t *data, uint8_t length) {\n    // TODO: Read report ID to determine the OLED screen to write to\n    raw_hid_send(data, length);\n    uint8_t* index = \u0026data[1];\n\n    memcpy(\u0026current_screen[(PAYLOAD_SIZE - 2) * (*index)], \u0026data[2], (PAYLOAD_SIZE - 2));\n}\n\n\nstatic void render_oled(void) {\n    oled_write_raw(current_screen, sizeof(current_screen));\n}\n\nbool oled_task_user(void) {\n    render_oled();\n    return false;\n}\n```\n\n\n## Roadmap\n\n| Feature               | Implemented |\n| ---------------       | :---------: |\n| Image rendering       |     ✅      |\n| Basic shape rendering |     ✅      |\n| Text rendering        |     ✅      |\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdob9601%2Fqmk-oled-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdob9601%2Fqmk-oled-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdob9601%2Fqmk-oled-api/lists"}