{"id":7232,"date":"2022-01-04T07:49:15","date_gmt":"2022-01-04T07:49:15","guid":{"rendered":"https:\/\/www.qec.tw\/?p=7232"},"modified":"2024-07-22T06:22:57","modified_gmt":"2024-07-22T06:22:57","slug":"qec-m-043t-86duinos-lvgl-example-demowidgets","status":"publish","type":"post","link":"https:\/\/www.qec.tw\/ja\/ethercat\/ethercat-application\/qec-m-043t-86duinos-lvgl-example-demowidgets\/","title":{"rendered":"QEC-M-043T + 86Duino\u2019s LVGL example: DemoWidgets"},"content":{"rendered":"<p class=\"wp-block-paragraph\">In this tutorial, you will learn to use LVGL (Light and Versatile Graphics Library) example to create a graphical user interface on QEC-M-043T.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1280\" height=\"720\" src=\"https:\/\/www.qec.tw\/wp-content\/uploads\/2022\/01\/lvglDemoWidgets_1.jpg\" alt=\"lvglDemoWidgets_1\" class=\"wp-image-7233\" srcset=\"https:\/\/www.qec.tw\/wp-content\/uploads\/2022\/01\/lvglDemoWidgets_1.jpg 1280w, https:\/\/www.qec.tw\/wp-content\/uploads\/2022\/01\/lvglDemoWidgets_1-300x169.jpg 300w, https:\/\/www.qec.tw\/wp-content\/uploads\/2022\/01\/lvglDemoWidgets_1-1024x576.jpg 1024w, https:\/\/www.qec.tw\/wp-content\/uploads\/2022\/01\/lvglDemoWidgets_1-768x432.jpg 768w, https:\/\/www.qec.tw\/wp-content\/uploads\/2022\/01\/lvglDemoWidgets_1-600x338.jpg 600w\" sizes=\"(max-width: 1280px) 100vw, 1280px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">\u76ee\u7684<\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>Understanding the structure to include LVGL Library.<\/li><li>Building an example UI.<\/li><li>Configuring the setup to display the UI.<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Required hardware and Software<\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/www.qec.tw\/ja\/product\/qec-m-043t\/\">QEC-M-043T<\/a><\/li><li><a href=\"https:\/\/www.qec.tw\/ja\/software\/\">86Duino IDE 500<\/a><\/li><li>USB to Micro-USB \u30b1\u30fc\u30d6\u30eb<\/li><\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">The Light and Versatile Graphics Library<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Graphical User interfaces are necessary. The Light and Versatile Graphics Library, also known as LVGL, is an open-sourced library that creates graphical user interfaces for microcontrollers and high-end processors.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The core LVGL library and the examples are directly available as 86Duino IDE 500 libraries.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Instructions<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The setup for this tutorial requires you to connect QEC-M-043T and PC by the USB-to-MicroUSB cable, then upload the finished sketch file to the QEC-M-043T. The LVGL example will display on the QEC-M-043T.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">The Basic Setup<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Begin by plugging QEC-M-043T into the computer using a USB-to-MicroUSB cable and opening the 86Duino IDE 500. If this is your first time running 86Duino sketch files, we suggest you check out how to <a href=\"https:\/\/www.qec.tw\/ja\/ethercat\/qec-example\/set-up-the-qec-m-043t-for-86duino\/\">set up the QEC-M-043T for 86Duino<\/a> before proceeding.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Open the LVGL Example<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Select \u201cQEC M043T\u201d in the <em>Tools -> Board<\/em> menu first.<br>Next, select &#8220;Examples&#8221; in the File menu, go to LVGL86 -> LVGL and open the &#8220;DemoWidgets&#8221;.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized is-style-default\"><img decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.qec.tw\/wp-content\/uploads\/2022\/01\/lvglDemoWidgetsLocation-1.png?fit=827%2C977&amp;ssl=1\" alt=\"lvglDemoWidgetsLocation\" class=\"wp-image-10854\" width=\"414\" height=\"489\" srcset=\"https:\/\/www.qec.tw\/wp-content\/uploads\/2022\/01\/lvglDemoWidgetsLocation-1.png 827w, https:\/\/www.qec.tw\/wp-content\/uploads\/2022\/01\/lvglDemoWidgetsLocation-1-254x300.png 254w, https:\/\/www.qec.tw\/wp-content\/uploads\/2022\/01\/lvglDemoWidgetsLocation-1-768x907.png 768w, https:\/\/www.qec.tw\/wp-content\/uploads\/2022\/01\/lvglDemoWidgetsLocation-1-10x12.png 10w, https:\/\/www.qec.tw\/wp-content\/uploads\/2022\/01\/lvglDemoWidgetsLocation-1-600x709.png 600w\" sizes=\"(max-width: 414px) 100vw, 414px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">LVGL DemoWidgets<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">There are 3 files in the \u2018DemoWidgets\u2019 example.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>DemoWidgets:<br><strong>*.ino<\/strong> files are your main application files.<\/li><li>lv_demo_widgets.c:<br><strong>*.c<\/strong> files are our C source code files in which our code is written and created by the user.<\/li><li>lv_demo_widgets.h:<br><strong>*.h<\/strong> files are header files that are prewritten for our compiler.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.qec.tw\/wp-content\/uploads\/2022\/01\/lvglDemoWidgets.png?fit=732%2C809&amp;ssl=1\" alt=\"lvglDemoWidgets\" class=\"wp-image-10855\" width=\"366\" height=\"405\" srcset=\"https:\/\/www.qec.tw\/wp-content\/uploads\/2022\/01\/lvglDemoWidgets.png 732w, https:\/\/www.qec.tw\/wp-content\/uploads\/2022\/01\/lvglDemoWidgets-271x300.png 271w, https:\/\/www.qec.tw\/wp-content\/uploads\/2022\/01\/lvglDemoWidgets-11x12.png 11w, https:\/\/www.qec.tw\/wp-content\/uploads\/2022\/01\/lvglDemoWidgets-600x663.png 600w\" sizes=\"(max-width: 366px) 100vw, 366px\" \/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Upload the Sketch<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Below are the complete steps for uploading the sketch to QEC-M-043T. Upload the sketch to QEC-M-043T, and then you can see the display on it.<\/p>\n\n\n\n<ol class=\"wp-block-list\" type=\"1\"><li>Select \u201cQEC M043T\u201d in the <em>Tools -> Board<\/em> menu.<\/li><li>Select the correct COM port in the <em>Tools -> Serial Port<\/em> menu. (Please open <em>Device Manager -> Ports (COM &amp; LPT) -> Prolific PL2303GC USB Serial COM Port (COMx)<\/em> to make sure your COM number.)<\/li><li>Click the &#8220;Upload&#8221; button to compile your code and upload it to the QEC-M-043T.<\/li><li>Then, you can see the DemoWidgets example on QEC-M-043T after the upload is complete.<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe title=\"QEC-M-043T + LVGL DemoWidgets\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/m-GHuzo1fUY?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u7d50\u8ad6<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This tutorial shows how to use the LVGL example to create a graphical user interface on QEC-M-043T and also shows how to use the &#8220;task&#8221; feature of LVGL to run instructions recurrently.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Next Steps<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Now that you know how to build a UI for a screen, you can connect the EtherCAT Slave device to QEC-M-043T for control with the UI.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u30c8\u30e9\u30d6\u30eb\u30b7\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Sketch Upload Troubleshooting<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If you have trouble uploading the sketch, please ensure:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Vs (Power of FGND\/GND\/VS) must be connected.<\/li><li>Please check the COM port. You can open the <em>Device Manager -> Ports (COM &amp; LPT) -> Prolific PL2303GC USB Serial COM Port (COMx)<\/em> to make sure your COM number.)<\/li><li>Boards: \u201cQEC M043T\u201d<\/li><\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph translation-block\"><em>86Duino\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9\u306e\u30c6\u30ad\u30b9\u30c8\u306f\u3001<a href=\"http:\/\/arduino.cc\/en\/Reference\/HomePage\" target=\"_self\">Arduino\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9<\/a>\u3092\u6539\u5909\u3057\u305f\u3082\u306e\u3067\u3001<a href=\"http:\/\/creativecommons.org\/licenses\/by-sa\/3.0\/\" target=\"_self\">Creative Commons Attribution-ShareAlike 3.0\u30e9\u30a4\u30bb\u30f3\u30b9<\/a>\u306b\u57fa\u3065\u3044\u3066\u30e9\u30a4\u30bb\u30f3\u30b9\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9\u5185\u306e\u30b3\u30fc\u30c9\u30b5\u30f3\u30d7\u30eb\u306f\u30d1\u30d6\u30ea\u30c3\u30af\u30c9\u30e1\u30a4\u30f3\u3068\u3057\u3066\u516c\u958b\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/em><\/p>","protected":false},"excerpt":{"rendered":"<p>In this tutorial, you will learn to use LVGL (Light and Versatile Graphics Library) example to create a graphical user interface on QEC-M-043T. Goals: Understanding [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":7254,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[196],"tags":[191],"class_list":["post-7232","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ethercat-application","tag-qec"],"_links":{"self":[{"href":"https:\/\/www.qec.tw\/ja\/wp-json\/wp\/v2\/posts\/7232","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.qec.tw\/ja\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.qec.tw\/ja\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.qec.tw\/ja\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.qec.tw\/ja\/wp-json\/wp\/v2\/comments?post=7232"}],"version-history":[{"count":0,"href":"https:\/\/www.qec.tw\/ja\/wp-json\/wp\/v2\/posts\/7232\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.qec.tw\/ja\/wp-json\/wp\/v2\/media\/7254"}],"wp:attachment":[{"href":"https:\/\/www.qec.tw\/ja\/wp-json\/wp\/v2\/media?parent=7232"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.qec.tw\/ja\/wp-json\/wp\/v2\/categories?post=7232"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.qec.tw\/ja\/wp-json\/wp\/v2\/tags?post=7232"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}