{"id":50337134,"url":"https://github.com/knifter/lib-soogh","last_synced_at":"2026-05-29T14:04:14.091Z","repository":{"id":133943032,"uuid":"428583708","full_name":"knifter/lib-soogh","owner":"knifter","description":"GUI Helper library with project-common code connecting LVGL to hardware","archived":false,"fork":false,"pushed_at":"2026-04-30T12:28:28.000Z","size":173,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-30T13:15:13.750Z","etag":null,"topics":["esp32","events","lovyangfx","lvgl"],"latest_commit_sha":null,"homepage":"","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/knifter.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-11-16T08:58:19.000Z","updated_at":"2026-04-30T12:28:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"7a5518db-6b59-4f4c-929b-c28aec8bc84c","html_url":"https://github.com/knifter/lib-soogh","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/knifter/lib-soogh","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knifter%2Flib-soogh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knifter%2Flib-soogh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knifter%2Flib-soogh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knifter%2Flib-soogh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/knifter","download_url":"https://codeload.github.com/knifter/lib-soogh/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knifter%2Flib-soogh/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33655525,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["esp32","events","lovyangfx","lvgl"],"created_at":"2026-05-29T14:04:13.246Z","updated_at":"2026-05-29T14:04:14.075Z","avatar_url":"https://github.com/knifter.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lib-soogh v0.10\n\nObject-oriented GUI framework for LVGL v9 + LovyanGFX on ESP32.\n\nProvides a screen stack, event system, and hardware bring-up layer for embedded displays. Targets M5Stack Core, M5Stack Core2, WT32-SC01, and Waveshare LCD4.\n\n## Version Changelog\n\n - v0.10 Moved LVGL handling to separate task and uses ESP Display Panel backend for LCD4, Needs Arduino3+IDF5: Pioduino\n - v0.9 is the LVGL9 ported version with Lovyan only, works on Ardiuno2+IDF4\n - v0.8 feature frozen LVGL8 version\n\n| Version   | framwork             | Arduino | ESP IDF | Lovyan | ESP Display Panel | LVGL | lv_timer_handler |\n|-----------|----------------------|---------|---------|--------|-------------------|------|------------------|\n| 0.10      | Pioduino 53.03.13    | 3.1.3   | 5.3.0   | Maybe  | 1.0.4             | 9.2  | thread           |\n| 0.9       | Espressif 6.9.0      | 2.x     | 4.x     | 1.2.0  | No                | 9.2  | gui.loop()       |\n| 0.8       | Espressif 6.9.0      | 2.x     | 4.x     | 1.2.0  | No                | 8.3  | gui.loop()       |\n\n\n## Features\n\n- **Screen stack** — push/pop `Screen` objects; each screen owns its LVGL widgets and lifecycle (`init`, `load`, `loop`, `close`)\n- **Event routing** — hardware button events (short, long, double, combo) mapped to `soogh_event_t` and dispatched to the active screen\n- **Hardware abstraction** — one `#define` selects the target device; display size, rotation, touch, double-buffering, and DMA flush are configured automatically\n- **LVGL group management** — push/pop `lv_group_t` in sync with the screen stack for correct focus handling\n- **Message box** — `showMessage()` for modal alerts from anywhere\n\n## Supported devices\n\n| Build flag                  | Device               | Resolution | Touch | Double-buf |\n|-----------------------------|----------------------|------------|-------|------------|\n| `SOOGH_DEV_M5CORE`          | M5Stack Core         | 320×240    | No    | No         |\n| `SOOGH_DEV_M5CORE2`         | M5Stack Core2        | 320×240    | Yes   | No         |\n| `SOOGH_DEV_WT32SC01`        | WT32-SC01 (ESP32-S3) | 480×320    | Yes   | Yes        |\n| `SOOGH_DEV_WAVESHARE_LCD4`  | Waveshare LCD4       | 480×480    | Yes   | Yes        |\n\n## Dependencies\n\n- [LVGL v9.2](https://github.com/lvgl/lvgl)\n- [LovyanGFX](https://github.com/lovyan03/LovyanGFX)\n- [lib-tools](https://github.com/knifter/lib-tools) (KeyTools button debounce/event)\n\n## Usage\n\n### PlatformIO\n\n```ini\nlib_deps =\n    https://github.com/lvgl/lvgl.git#release/v9.2\n    https://github.com/lovyan03/LovyanGFX\n    https://github.com/knifter/lib-tools\n    https://github.com/knifter/lib-soogh\n\nbuild_flags =\n    -D SOOGH_DEV_M5CORE\n```\n\n### LVGL configuration\n\nCopy `include/lv_conf_project.example` to your project's `include/lv_conf_project.h` and adjust as needed. The library ships its own `lv_conf.h` which includes your project file.\n\n### Implementing a screen\n\nInherit from `Screen` and override the virtual methods you need:\n\n```cpp\n#include \u003csoogh.h\u003e\n\nclass MyScreen : public Screen\n{\npublic:\n    MyScreen(SooghGUI\u0026 gui) : Screen(gui) {}\n\n    ScreenType type() override { return ScreenType::MAIN; }\n\n    void init() override\n    {\n        // create LVGL widgets here, parented to _screen\n        lv_obj_t* label = lv_label_create(_screen);\n        lv_label_set_text(label, \"Hello\");\n    }\n\n    bool handle(soogh_event_t e) override\n    {\n        if(e == KEY_B_PRESSED) { _gui.popScreen(); return true; }\n        return false;\n    }\n\n    void loop() override\n    {\n        // called every GUI tick\n    }\n};\n```\n\n### Application setup\n\n```cpp\nSooghGUI gui;\n\nvoid setup()\n{\n    gui.begin();\n    gui.pushScreen(std::make_shared\u003cMyScreen\u003e(gui));\n}\n\nvoid loop()\n{\n    soogh_event_t e = get_key_event(); // your button scanning\n    gui.handle(e);\n    gui.loop();\n}\n```\n\n## DMA / SPI bus note\n\nOn M5Stack Core the display uses the VSPI peripheral via LovyanGFX DMA. If you share the SPI bus with another device (e.g. MAX31865), call `lgfx_check_flush()` after `gui.loop()` and before your SPI transactions to ensure the DMA transfer is complete and the bus is released:\n\n```cpp\nvoid loop()\n{\n    gui.handle(e);\n    gui.loop();\n    lgfx_check_flush();   // release SPI bus before using it elsewhere\n    // safe to use SPI here\n}\n```\n\n## Author\nThis software is written by [Tijs van Roon](https://github.com/knifter). It is free to use under the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknifter%2Flib-soogh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fknifter%2Flib-soogh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknifter%2Flib-soogh/lists"}