{"id":16219801,"url":"https://github.com/dontsovcmc/arduinomultidesktop","last_synced_at":"2025-03-19T11:30:41.284Z","repository":{"id":78360562,"uuid":"72205701","full_name":"dontsovcmc/ArduinoMultiDesktop","owner":"dontsovcmc","description":"MultiDesktop concept for hardware devices","archived":false,"fork":false,"pushed_at":"2016-10-28T14:22:17.000Z","size":47,"stargazers_count":8,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-28T18:23:00.015Z","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/dontsovcmc.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":"2016-10-28T12:32:04.000Z","updated_at":"2024-11-14T02:32:09.000Z","dependencies_parsed_at":"2023-04-22T07:48:11.986Z","dependency_job_id":null,"html_url":"https://github.com/dontsovcmc/ArduinoMultiDesktop","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/dontsovcmc%2FArduinoMultiDesktop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dontsovcmc%2FArduinoMultiDesktop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dontsovcmc%2FArduinoMultiDesktop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dontsovcmc%2FArduinoMultiDesktop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dontsovcmc","download_url":"https://codeload.github.com/dontsovcmc/ArduinoMultiDesktop/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243985792,"owners_count":20379205,"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-10T11:56:06.626Z","updated_at":"2025-03-19T11:30:41.275Z","avatar_url":"https://github.com/dontsovcmc.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ArduinoMultiDesktop\n\nMultiDesktop little library for easy buttons + screen coding.\n\n![MultiDesktop library overview](/img/main.png)\n\nI use https://github.com/neu-rah/ArduinoMenu for button support and for Menu printing.\n\nThe first example with control through Serial:\n\n## Quick Start\n\n```\n//We have 2 'buttons' for actions. They are characters readed from Serial, or push buttons of ArduinoMenu library.\nint8_t codes[] = { '+' , '-' };\n\n// The 3rd button - button to change desktop\nMultiDesktop\u003c2\u003e multi_desktop( '*' , codes);\n\n// Create desktop\nvoid show_1_screen() { /* show smth */ }\nvoid up() { /*do smth by press '+' */ }\nvoid down() { /*do smth by press '-' */ }\n\n// Callback list size == 2 !\nfunc desktop1cb[] = { \u0026up, \u0026down };\n\nDesktop\u003c2\u003e mainDesktop(\u0026show_1_screen, desktop1cb); \n\n// Create another desktop\nvoid show_2_screen() {  /* show smth 2 */ }\nvoid led_button() { /* turn led */ }\n\n// If you don't want to use some buttons, write 0 !\nfunc desktop2cb[] = { \u0026led_button, 0 };\n\nDesktop\u003c2\u003e secondDesktop(\u0026show_2_screen, desktop2cb);\n```\n\nAdd desktop to MultiDesktop in setup function:\n```\nmulti_desktop.add_desktop(\u0026mainDesktop);\nmulti_desktop.add_desktop(\u0026secondDesktop);\n\nmulti_desktop.show();\n```\n\nEnjoy:\n```\nvoid loop() \n{\t\n\tif (Serial.available()) \n\t{\n        char ch = Serial.read();\n\t\tmulti_desktop.button_pressed(ch);\n\t\tmulti_desktop.show(); \n    }\n\tdelay(1);\n}\n```\n\n## Examples\n\nSee examples in source folder:\n\n1. serial_2leds_2codes.cpp\n  * Input '+' '*' from Serial, 2 desktops, 1 actions on each desktop : toggle own LED\n\n2. serial_3codes.cpp\n  * Input '+' '-' '*' from Serial, 3 desktops, 1-2 actions: print smth\n\n3. serial_button_3codes.cpp\n  * Input '+' '-' '*' from Serial or 3 buttons, 3 desktops, 1-2 actions: print smth\n\n4. serial_button_led_menu_3codes.cpp\n  * Input '+' '-' '*' from Serial or 3 buttons:\n  * Desktop 1: message\n  * Desktop 2: toggle LED\n  * Desktop 3: start menu\n\n  * Menu: toggle LED\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdontsovcmc%2Farduinomultidesktop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdontsovcmc%2Farduinomultidesktop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdontsovcmc%2Farduinomultidesktop/lists"}