{"id":25365917,"url":"https://github.com/willguimont/arduinogui","last_synced_at":"2026-05-18T15:31:49.130Z","repository":{"id":111210485,"uuid":"70107336","full_name":"willGuimont/ArduinoGUI","owner":"willGuimont","description":"GUI for Arduino TFT screen","archived":false,"fork":false,"pushed_at":"2017-08-01T20:34:13.000Z","size":8,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-08T19:05:43.583Z","etag":null,"topics":["arduino","arduino-library","gui","tft","touchscreen"],"latest_commit_sha":null,"homepage":"","language":"C++","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/willGuimont.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-05T23:23:30.000Z","updated_at":"2023-10-31T21:34:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"195089e9-85e0-4b85-a405-48440c7dc537","html_url":"https://github.com/willGuimont/ArduinoGUI","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/willGuimont/ArduinoGUI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willGuimont%2FArduinoGUI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willGuimont%2FArduinoGUI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willGuimont%2FArduinoGUI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willGuimont%2FArduinoGUI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/willGuimont","download_url":"https://codeload.github.com/willGuimont/ArduinoGUI/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willGuimont%2FArduinoGUI/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33182731,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-18T09:27:30.708Z","status":"ssl_error","status_checked_at":"2026-05-18T09:27:28.300Z","response_time":71,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["arduino","arduino-library","gui","tft","touchscreen"],"created_at":"2025-02-14T23:51:14.363Z","updated_at":"2026-05-18T15:31:49.112Z","avatar_url":"https://github.com/willGuimont.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ArduinoGUI\n\nAllows you to create a GUI for a TFT LCD screen on an arduino.\nYou will need the following libraries: \"Adafruit_GFX.h\", \"Adafruit_TFTLCD.h\" and \"TouchScreen.h\" to get it working.\n\n= Quickstart =\n```C++\n// Defines\n\n#if defined(__SAM3X8E__)\n    #undef __FlashStringHelper::F(string_literal)\n    #define F(string_literal) string_literal\n#endif\n\n// Touch screen pins\n#define YP A1  // must be an analog pin, use \"An\" notation!\n#define XM A2  // must be an analog pin, use \"An\" notation!\n#define YM 7   // can be a digital pin\n#define XP 6   // can be a digital pin\n\n// Pression defines\n#define TS_MINX 150\n#define TS_MINY 120\n#define TS_MAXX 920\n#define TS_MAXY 940\n\n// LCD pins\n#define LCD_CS A3\n#define LCD_CD A2\n#define LCD_WR A1\n#define LCD_RD A0\n#define LCD_RESET A4 // optional\n\n// Assign human-readable names to some common 16-bit color values:\n\n#define BLACK   0x0000\n#define BLUE    0x001F\n#define RED     0xF800\n#define GREEN   0x07E0\n#define CYAN    0x07FF\n#define MAGENTA 0xF81F\n#define YELLOW  0xFFE0\n#define WHITE   0xFFFF\n\n// Create touchscreen \u0026 TFTscreen objects\nTouchScreen ts = TouchScreen(XP, YP, XM, YM, 300);\nAdafruit_TFTLCD tft(LCD_CS, LCD_CD, LCD_WR, LCD_RD, LCD_RESET);\n\n// Create GUI handler object\nGUI gui(\u0026tft);\n\n// Ornements (add custom stuff on your buttons)\n// You have to inherite from Ornement and override\n// \"void draw(Adafruit_TFTLCD* tft)\"\n// use getX(), getY(), getW() and getH() to get position and size\nclass UpArrow : public Ornement\n{\n  virtual void draw(Adafruit_TFTLCD* tft)\n  {\n    int x = getX();\n    int y = getY();\n    int w = getW();\n    int h = getH();\n    tft-\u003efillTriangle(x +  w/2,  y + (w)/3,\n                           x +  w/3,  y +   2*(w)/3,\n                           x + 2*(w)/3, y + 2*(w)/3,\n                           MAGENTA);\n  }\n};\n\n// Same to write text on button\nclass TextOrnment : public Ornement\n{\n  virtual void draw(Adafruit_TFTLCD* tft)\n  {\n    int x = getX();\n    int y = getY();\n    int h = getH();\n    \n    tft-\u003esetCursor(x, y + 7);\n    tft-\u003esetTextColor(BLACK);  tft-\u003esetTextSize(h-2);\n    tft-\u003eprint(\"Hello\");\n  }\n};\n\n// Callbacks (will be called when pressed)\n// You have to inherite from Callback and override\n// \"void execute()\"\n\nclass PrintText : public Callback\n{\n  public:\n    PrintText(char* text)\n    {\n      text_ = text;\n    }\n    void execute()\n    {\n        Serial.println(text_);\n    } \n  private:\n    char* text_;\n};\n\n// Setup\nvoid setup(void) \n{\n  // Init tft\n  tft.reset();\n  uint16_t identifier = tft.readID();\n  tft.begin(identifier);\n  tft.fillScreen(BLACK);\n  pinMode(13, OUTPUT);\n  \n  // 0x07E0 = GREEN\n  // Add rect button to GUI\n  // RectButton(int x, int y, int w, int h, long color);\n  gui.addButton((new RectButton(10, 10, 100, 100, GREEN))-\u003esetOrnement(new UpArrow)-\u003esetCallback(new PrintText(\"Up button\")));\n  // Add rect button to GUI\n  // RoundButton(int x, int y, int r, long color);\n  gui.addButton((new RoundButton(70, 230, 50, GREEN))-\u003esetCallback(new PrintText(\"Round button\")));\n  \n  // Draw GUI\n  gui.draw();\n}\n\n// Main loop\nvoid loop()\n{\n  // Get input\n  digitalWrite(13, HIGH);\n  TSPoint p = ts.getPoint();\n  digitalWrite(13, LOW);\n\n  // if sharing pins, you'll need to fix the directions of the touchscreen pins\n  //pinMode(XP, OUTPUT);\n  pinMode(XM, OUTPUT);\n  pinMode(YP, OUTPUT);\n  //pinMode(YM, OUTPUT);\n\n  // we have some minimum pressure we consider 'valid'\n  // pressure of 0 means no pressing!\n\n  if (p.z \u003e MINPRESSURE \u0026\u0026 p.z \u003c MAXPRESSURE) {\n    // scale from 0-\u003e1023 to tft.width\n    p.x = map(p.x, TS_MINX, TS_MAXX, tft.width(), 0);\n    p.y = map(p.y, TS_MINY, TS_MAXY, tft.height()-80, 0); // May need ajustment, some screens are strange...\n    \n    // Update return true if a button has been press\n    // Corresponding callback will be called\n    if (gui.update(p))        \n    {\n      tft.fillScreen(BLACK);  // Clear screen\n      gui.draw();             // Draw GUI\n      delay(50);              // Must wait for the screen to have finished drawing\n    }\n  }\n}\n```\n== License ==\n\nTFTLCD_GUI - Library to make GUI on TFT LCD screens.\nCreated by William Guimont-Martin, 2015.\nReleased into the public domain.\n\t\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillguimont%2Farduinogui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwillguimont%2Farduinogui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillguimont%2Farduinogui/lists"}