{"id":21055,"date":"2021-06-26T10:45:37","date_gmt":"2021-06-26T01:45:37","guid":{"rendered":"https:\/\/www.souichi.club\/?p=21055"},"modified":"2022-03-19T17:24:49","modified_gmt":"2022-03-19T08:24:49","slug":"m5stickc","status":"publish","type":"post","link":"https:\/\/www.souichi.club\/en\/m5stack\/m5stickc\/","title":{"rendered":"I created a simple program (C++) in Arduino IDE and tried to run it on M5StickC."},"content":{"rendered":"<ul class=\"bogo-language-switcher list-view\"><li class=\"en-US en current first\"><span class=\"bogoflags bogoflags-us\"><\/span> <span class=\"bogo-language-name\"><a rel=\"alternate\" hreflang=\"en-US\" href=\"https:\/\/www.souichi.club\/en\/wp-json\/wp\/v2\/posts\/21055\/\" title=\"English\" class=\"current\" aria-current=\"page\">English<\/a><\/span><\/li>\n<li class=\"ja last\"><span class=\"bogoflags bogoflags-jp\"><\/span> <span class=\"bogo-language-name\"><a rel=\"alternate\" hreflang=\"ja\" href=\"https:\/\/www.souichi.club\/wp-json\/wp\/v2\/posts\/21055\/\" title=\"Japanese\">\u65e5\u672c\u8a9e<\/a><\/span><\/li>\n<\/ul>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_83 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6a13d11b39385\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #454e5c;color:#454e5c\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #454e5c;color:#454e5c\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6a13d11b39385\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/m5stickc\/#Introduction\" >Introduction<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/m5stickc\/#What_is_M5StickC\" >What is M5StickC?<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/m5stickc\/#TFT_LCD_Thin_Film_Transistor_Liquid_Crystal_Display\" >TFT LCD (Thin Film Transistor Liquid Crystal Display)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/m5stickc\/#Wi-Fi_Bluetooth\" >Wi-Fi, Bluetooth<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/m5stickc\/#Lithium-ion_polymer_battery\" >Lithium-ion polymer battery<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/m5stickc\/#Buttons\" >Buttons<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/m5stickc\/#Power_button_and_button_A\" >Power button and button A<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/m5stickc\/#button_B\" >button B<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/m5stickc\/#Connectors\" >Connectors<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/m5stickc\/#Extension_Connectors\" >Extension Connectors<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/m5stickc\/#LED\" >LED<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/m5stickc\/#Infrared_transmission\" >Infrared transmission<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/m5stickc\/#Accelerometer_and_gyroscope\" >Accelerometer and gyroscope<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/m5stickc\/#Microphone\" >Microphone<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/m5stickc\/#M5Stack_Series\" >M5Stack Series<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/m5stickc\/#M5Stack\" >M5Stack<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/m5stickc\/#1_M5Stack_Basic\" >1. M5Stack Basic<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-18\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/m5stickc\/#2_M5Stack_Gray\" >2. M5Stack Gray<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-19\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/m5stickc\/#3_M5Stack_Faces\" >3. M5Stack Faces<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-20\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/m5stickc\/#4_M5Stack_FIRE\" >4. M5Stack FIRE<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-21\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/m5stickc\/#5_M5GO_IoT_Starter_Kit\" >5. M5GO IoT Starter Kit<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-22\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/m5stickc\/#6_M5Stack_Core2\" >6. M5Stack Core2<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-23\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/m5stickc\/#7_M5Stack_UnitV2\" >7. M5Stack UnitV2<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-24\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/m5stickc\/#M5Stick_Series\" >M5Stick Series<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-25\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/m5stickc\/#1_M5StickC\" >1. M5StickC<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-26\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/m5stickc\/#2_M5StickC_Plus\" >2. M5StickC Plus<\/a><\/li><\/ul><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-27\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/m5stickc\/#programming_environment\" >programming environment<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-28\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/m5stickc\/#Environment\" >Environment<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-29\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/m5stickc\/#Selecting_a_development_environment_and_programming_language\" >Selecting a development environment and programming language<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-30\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/m5stickc\/#Download_the_Arduino_IDE\" >Download the Arduino IDE<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-31\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/m5stickc\/#Launch_the_installer\" >Launch the installer<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-32\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/m5stickc\/#Install_additional_software\" >Install additional software<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-33\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/m5stickc\/#Preparing_the_operating_environment\" >Preparing the operating environment<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-34\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/m5stickc\/#Add_a_board_manager\" >Add a board manager<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-35\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/m5stickc\/#Installing_the_library\" >Installing the library<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-36\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/m5stickc\/#Checking_the_COM_port\" >Checking the COM port<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-37\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/m5stickc\/#Selecting_a_board\" >Selecting a board<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-38\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/m5stickc\/#Selecting_a_port\" >Selecting a port<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-39\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/m5stickc\/#test_program\" >test program<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-40\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/m5stickc\/#Specifications\" >Specifications<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-41\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/m5stickc\/#source-code\" >source-code<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-42\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/m5stickc\/#Compiling_and_Writing\" >Compiling and Writing<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-43\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/m5stickc\/#Restore_the_original_program\" >Restore the original program<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Introduction\"><\/span>Introduction<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>I got an M5StickC, so I&#8217;ll leave this article as a reminder of how I made a simple program to make it work.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\" id=\"m5stickc\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-01.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-01.jpg?resize=512%2C318&#038;ssl=1\" alt=\"Appearance of the M5StickC\" class=\"wp-image-17754\" width=\"512\" height=\"318\" title=\"\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-01.jpg?resize=1024%2C636&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-01.jpg?resize=300%2C186&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-01.jpg?resize=768%2C477&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-01.jpg?w=1280&amp;ssl=1 1280w\" sizes=\"auto, (max-width: 512px) 100vw, 512px\" \/><\/a><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_is_M5StickC\"><\/span>What is M5StickC?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>M5StickC is a stick-type product from M5Stack Company, which is based on ESP32-PICO, the same architecture as ESP32.<\/p>\n\n\n\n<p>The features<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>4MB flash + 520K RAM memory<\/li><li>TFT LCD (TFT liquid crystal display)<\/li><li>Wi-Fi, Bluetooth<\/li><li>Built-in lithium-ion polymer battery (80mAh)<\/li><li>Power button + 2 buttons<\/li><li>USB Type-C connector<\/li><li>HY2.0-4P (Grove compatible connector)<\/li><li>LED x 1<\/li><li>Infrared transmission<\/li><li>Expansion connector<\/li><li>3-axis accelerometer + 3-axis gyroscope (6 axes)<\/li><li>Built-in Microphone<\/li><\/ul>\n\n\n\n<p>Let me explain the features of the M5StickC in more detail.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"TFT_LCD_Thin_Film_Transistor_Liquid_Crystal_Display\"><\/span>TFT LCD (Thin Film Transistor Liquid Crystal Display)<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>The display is a 0.96&#8243; (80 x 160) TFT LCD (Thin Film Transistor Liquid Crystal Display).<\/p>\n\n\n\n<p>The module used was marked as ST7735S.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Wi-Fi_Bluetooth\"><\/span>Wi-Fi, Bluetooth<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Since it is based on ESP32, it has built-in Wi-Fi and Bluetooth.<\/p>\n\n\n\n<p>The following photo shows a sample application of BLE (Bluetooth Low Energy) pre-installed at the factory.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-10.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-10.jpg?resize=512%2C295&#038;ssl=1\" alt=\"BLE Sample Application\" class=\"wp-image-17777\" width=\"512\" height=\"295\" title=\"\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-10.jpg?resize=1024%2C590&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-10.jpg?resize=300%2C173&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-10.jpg?resize=768%2C442&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-10.jpg?w=1280&amp;ssl=1 1280w\" sizes=\"auto, (max-width: 512px) 100vw, 512px\" \/><\/a><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Lithium-ion_polymer_battery\"><\/span>Lithium-ion polymer battery<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>The built-in battery was a lithium-ion polymer battery.<\/p>\n\n\n\n<p>It is also used in drones, and while it is small and powerful, I have heard that it should be used at high temperatures and handled with care when charging, so it should not be handled roughly.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Buttons\"><\/span>Buttons<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>There are three buttons: power button, button A, and button B.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Power_button_and_button_A\"><\/span>Power button and button A<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Button A is on the front, and the power button is on the side.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Power on: press the power button for 2 seconds<\/li><li>Power off: Press the power button for 6 seconds<\/li><\/ul>\n\n\n\n<p>The power off is designed to be pressed slightly longer than the power on.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-03.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-03.jpg?resize=512%2C294&#038;ssl=1\" alt=\"Button A,Power\" class=\"wp-image-21072\" width=\"512\" height=\"294\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-03.jpg?resize=1024%2C588&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-03.jpg?resize=300%2C172&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-03.jpg?resize=768%2C441&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-03.jpg?resize=1536%2C882&amp;ssl=1 1536w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-03.jpg?w=1920&amp;ssl=1 1920w\" sizes=\"auto, (max-width: 512px) 100vw, 512px\" \/><\/a><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"button_B\"><\/span>button B<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Button B is on the other side of the power button.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-04.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-04.jpg?resize=512%2C338&#038;ssl=1\" alt=\"Button B\" class=\"wp-image-21073\" width=\"512\" height=\"338\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-04.jpg?resize=1024%2C675&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-04.jpg?resize=300%2C198&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-04.jpg?resize=768%2C506&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-04.jpg?resize=1536%2C1013&amp;ssl=1 1536w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-04.jpg?w=1920&amp;ssl=1 1920w\" sizes=\"auto, (max-width: 512px) 100vw, 512px\" \/><\/a><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Connectors\"><\/span>Connectors<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>The top connector in the picture below is the USB Type-C connector used for power supply and downloading programs created on the PC.<\/p>\n\n\n\n<p>The 4-pin connector below is the GROVE compatible HY2.0-4P.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-02.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-02.jpg?resize=512%2C431&#038;ssl=1\" alt=\"Connectors\" class=\"wp-image-17762\" width=\"512\" height=\"431\" title=\"\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-02.jpg?resize=1024%2C862&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-02.jpg?resize=300%2C253&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-02.jpg?resize=768%2C647&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-02.jpg?w=1280&amp;ssl=1 1280w\" sizes=\"auto, (max-width: 512px) 100vw, 512px\" \/><\/a><\/figure>\n\n\n\n<p>The HY2.0-4P has two signal lines in addition to the power and GND lines.<\/p>\n\n\n\n<p>From left to right in the following picture<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>GND<\/li><li>Vout (5.0V)<\/li><li>GPIO32 (SDA)<\/li><li>GPIO33 (SCL)<\/li><\/ul>\n\n\n\n<p>You can see them on the sticker on the back.<\/p>\n\n\n\n<p>I haven&#8217;t tested it yet, but there was an article about measuring temperature, humidity, and barometric pressure with the BME280 using I2C communication between SDA and SCL.<\/p>\n\n\n\n<p>I&#8217;d like to try it eventually.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-05.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-05.jpg?resize=512%2C435&#038;ssl=1\" alt=\"HY2.0-4P\" class=\"wp-image-17766\" width=\"512\" height=\"435\" title=\"\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-05.jpg?resize=1024%2C870&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-05.jpg?resize=300%2C255&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-05.jpg?resize=768%2C652&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-05.jpg?w=1280&amp;ssl=1 1280w\" sizes=\"auto, (max-width: 512px) 100vw, 512px\" \/><\/a><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Extension_Connectors\"><\/span>Extension Connectors<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>On the other side of the USB connector is a 2.54mm pitch general-purpose pin connector.<\/p>\n\n\n\n<p>From left to right in the photo.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>5.0V input<\/li><li>3.3V output *<\/li><li>Built-in battery *<\/li><li>GPIO0<\/li><li>GPIO0 GPIO36<\/li><li>GPIO26<\/li><li>5.0V output *<\/li><li>GND<\/li><\/ul>\n\n\n\n<p>* The 3.3V and 5.0V outputs only apply voltage when the power is on.<\/p>\n\n\n\n<p>The built-in battery outputs a voltage of 3.928V (when fully charged) even when the power is off.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-06.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-06.jpg?resize=512%2C357&#038;ssl=1\" alt=\"Extension Connectors\" class=\"wp-image-17768\" width=\"512\" height=\"357\" title=\"\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-06.jpg?resize=1024%2C713&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-06.jpg?resize=300%2C209&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-06.jpg?resize=768%2C535&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-06.jpg?w=1280&amp;ssl=1 1280w\" sizes=\"auto, (max-width: 512px) 100vw, 512px\" \/><\/a><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"LED\"><\/span>LED<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>The red LED is on the upper left of the unit.<\/p>\n\n\n\n<p><a href=\"#m5stickc\">The aforementioned photo<\/a> shows the LED in the lit state.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Infrared_transmission\"><\/span>Infrared transmission<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>I have not tested it yet, but it seems to be able to send infrared rays.<\/p>\n\n\n\n<p>The following picture shows a sample application for infrared transmission, which is preinstalled at the factory.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-09.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-09.jpg?resize=512%2C330&#038;ssl=1\" alt=\"Infrared transmission\" class=\"wp-image-17776\" width=\"512\" height=\"330\" title=\"\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-09.jpg?resize=1024%2C660&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-09.jpg?resize=300%2C193&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-09.jpg?resize=768%2C495&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-09.jpg?w=1280&amp;ssl=1 1280w\" sizes=\"auto, (max-width: 512px) 100vw, 512px\" \/><\/a><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Accelerometer_and_gyroscope\"><\/span>Accelerometer and gyroscope<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>It has a 3-axis (X, Y, Z) accelerometer and a 3-axis gyroscope (chip: MPU6886) that can measure the state of the M5StickC when it is tilted, shaken, or rotated.<\/p>\n\n\n\n<p>The accelerometer measures the change in speed per unit of time, so it measures the state when the speed is getting faster (slower).<\/p>\n\n\n\n<p>Acceleration is zero in the case of stationary or constant velocity motion.<\/p>\n\n\n\n<p>The gyro sensor is a sensor that detects changes in angle (angular velocity).<\/p>\n\n\n\n<p>If the object rotates on the spot, the acceleration will be zero with the acceleration sensor because the position is not moving, but it can be detected with the gyro sensor.<\/p>\n\n\n\n<p>The combination of accelerometer and gyroscope can detect the movement of most objects.<\/p>\n\n\n\n<p>The following picture shows a sample application using the accelerometer and gyroscope preinstalled at the factory.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-07.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-07.jpg?resize=512%2C357&#038;ssl=1\" alt=\"Programs using accelerometers and gyroscopes\" class=\"wp-image-17772\" width=\"512\" height=\"357\" title=\"\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-07.jpg?resize=1024%2C714&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-07.jpg?resize=300%2C209&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-07.jpg?resize=768%2C535&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-07.jpg?w=1280&amp;ssl=1 1280w\" sizes=\"auto, (max-width: 512px) 100vw, 512px\" \/><\/a><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Microphone\"><\/span>Microphone<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>The microphone is built into the bottom of the M5 button and the chip used is SPM1423.<\/p>\n\n\n\n<p>The picture below shows a sample application using the microphone pre-installed at the factory.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-08.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-08.jpg?resize=512%2C335&#038;ssl=1\" alt=\"Microphone application example\" class=\"wp-image-17773\" width=\"512\" height=\"335\" title=\"\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-08.jpg?resize=1024%2C670&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-08.jpg?resize=300%2C196&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-08.jpg?resize=768%2C503&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-08.jpg?w=1280&amp;ssl=1 1280w\" sizes=\"auto, (max-width: 512px) 100vw, 512px\" \/><\/a><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"M5Stack_Series\"><\/span>M5Stack Series<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>There are a lot of products with similar names, and I didn&#8217;t know the difference between them.<\/p>\n\n\n\n<p>If you already know the difference between these products, please skip to the next section, &#8220;<a href=\"#environment\">Program Environment<\/a>&#8220;.<\/p>\n\n\n\n<p>M5Stack is headquartered in Shenzhen, China, and manufactures ESP32-based M5Stack and M5Stick series products.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"M5Stack\"><\/span>M5Stack<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>The M5Stack series mainly consists of the following products.<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>M5Stack Basic<\/li><li>M5Stack Gray (with 9-axis IMU)<\/li><li>M5Stack Faces (with 9-axis IMU and various covers)<\/li><li>M5Stack FIRE<\/li><li>M5GO IoT Starter Kit (with various IoT sensors)<\/li><li>M5Stack Core2<\/li><\/ol>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"1_M5Stack_Basic\"><\/span>1. M5Stack Basic<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Basic M5Stack.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-01.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-01.jpg?resize=233%2C234&#038;ssl=1\" alt=\"M5Stack Basic\" class=\"wp-image-21064\" width=\"233\" height=\"234\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-01.jpg?w=466&amp;ssl=1 466w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-01.jpg?resize=300%2C300&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-01.jpg?resize=150%2C150&amp;ssl=1 150w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-01.jpg?resize=80%2C80&amp;ssl=1 80w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-01.jpg?resize=320%2C320&amp;ssl=1 320w\" sizes=\"auto, (max-width: 233px) 100vw, 233px\" \/><\/a><\/figure>\n\n\n<figure class=\"wp-block-table is-style-regular\">\n<table class=\"r_table01\">\n<tbody>\n<tr>\n<td class=\"r_td30\">\n<p>On-board chip<\/p>\n<\/td>\n<td>\n<p>ESP32 240MHz dual core<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"r_td30\">\n<p>Memory<\/p>\n<\/td>\n<td>\n<p>520KB SRAM<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"r_td30\">\n<p>Flash Memory<\/p>\n<\/td>\n<td>\n<p>4M FLASH<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"r_td30\">\n<p>Display<\/p>\n<\/td>\n<td>\n<p>320 x 240 color TFT LCD(2.0 inch)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Network<\/p>\n<\/td>\n<td>\n<p>Wi-Fi\u3001dual mode Bluetooth<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Input volt.<\/p>\n<\/td>\n<td>\n<p>&nbsp;5.0V &#8211; 5.5V \/ 500mA(USB Type-C)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Interface<\/p>\n<\/td>\n<td>\n<ul>\n<li>USB Type-C x 1<\/li>\n<li>SPI x 1<\/li>\n<li>GROVE I2C(HY2.0-4) x 1<\/li>\n<li>UART x 2<\/li>\n<li>I2S(SCLK,WS,MCLK,IN,OUT) x 1<\/li>\n<li>microSD slot x 1<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Built-in speaker<\/p>\n<\/td>\n<td>\n<p>1W<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Built-in battery<\/p>\n<\/td>\n<td>\n<p>3.7V \/ 150mAh<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"2_M5Stack_Gray\"><\/span>2. M5Stack Gray<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>The M5Stack Basic model is equipped with a 6-axis sensor (MPU6886) that detects 3 acceleration axes and 3 gyroscopic axes, and a sensor (BMM150) that can measure 3-axis geomagnetism.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-07.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-07.jpg?resize=232%2C230&#038;ssl=1\" alt=\"M5Stack Gray\" class=\"wp-image-21082\" width=\"232\" height=\"230\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-07.jpg?w=464&amp;ssl=1 464w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-07.jpg?resize=300%2C297&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-07.jpg?resize=150%2C150&amp;ssl=1 150w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-07.jpg?resize=80%2C80&amp;ssl=1 80w\" sizes=\"auto, (max-width: 232px) 100vw, 232px\" \/><\/a><\/figure>\n\n\n<figure class=\"wp-block-table is-style-regular\">\n<table class=\"r_table01\">\n<tbody>\n<tr>\n<td class=\"r_td30\">\n<p>On-board chip<\/p>\n<\/td>\n<td>\n<p>ESP32 240MHz dual core<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"r_td30\">\n<p>Memory<\/p>\n<\/td>\n<td>\n<p>520KB SRAM<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Flash Memory<\/p>\n<\/td>\n<td>\n<p>16M FLASH<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"r_td30\">\n<p>Display<\/p>\n<\/td>\n<td>\n<p>320 x 240 color TFT LCD (2.0 inch)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Network<\/p>\n<\/td>\n<td>\n<p>Wi-Fi, dual mode Bluetooth<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Input<\/p>\n<\/td>\n<td>\n<p>&nbsp;5.0V &#8211; 5.5V \/ 500mA (USB Type-C)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Interface<\/p>\n<\/td>\n<td>\n<ul>\n<li>USB Type-C x 1<\/li>\n<li>SPI x 1<\/li>\n<li>GROVE I2C(HY2.0-4) x 1<\/li>\n<li>UART x 2<\/li>\n<li>I2S(SCLK, WS, MCLK, IN, OUT) x 1<\/li>\n<li>microSD slot x 1<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"r_td30\">\n<p>Inertial measurement sensor<\/p>\n<\/td>\n<td>\n<ul>\n<li>MPU6886: 6 axes(3 axes of acceleration and 3 axes of gyro (angular velocity))<\/li>\n<li>BMM150:Geomagnetic 3-axis<\/li>\n<\/ul>\n<p>Early model was MPU9250, but changed to MPU6886 + BMM150 combination around 2019.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Built-in speaker<\/p>\n<\/td>\n<td>\n<p>1W<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Built-in battery<\/p>\n<\/td>\n<td>\n<p>3.7V \/ 150mAh<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"3_M5Stack_Faces\"><\/span>3. M5Stack Faces<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>M5Stack Gray with 9-axis sensor, keyboard, numeric keypad, and gaming panel.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-02.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-02.jpg?resize=236%2C234&#038;ssl=1\" alt=\"M5Stack Faces\" class=\"wp-image-21068\" width=\"236\" height=\"234\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-02.jpg?w=472&amp;ssl=1 472w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-02.jpg?resize=300%2C297&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-02.jpg?resize=150%2C150&amp;ssl=1 150w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-02.jpg?resize=80%2C80&amp;ssl=1 80w\" sizes=\"auto, (max-width: 236px) 100vw, 236px\" \/><\/a><\/figure>\n\n\n<figure class=\"wp-block-table is-style-regular\">\n<table class=\"r_table01\">\n<tbody>\n<tr>\n<td class=\"r_td30\">\n<p>On-board chip<\/p>\n<\/td>\n<td>\n<p>ESP32 240MHz dual core<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"r_td30\">\n<p>Memory<\/p>\n<\/td>\n<td>\n<p>520KB SRAM<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Flash Memory<\/p>\n<\/td>\n<td>\n<p>16M FLASH<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"r_td30\">\n<p>Display<\/p>\n<\/td>\n<td>\n<p>320 x 240 color TFT LCD (2.0 inch)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Network<\/p>\n<\/td>\n<td>\n<p>Wi-Fi, dual mode Bluetooth<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Input<\/p>\n<\/td>\n<td>\n<p>&nbsp;5.0V &#8211; 5.5V \/ 500mA (USB Type-C)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Interface<\/p>\n<\/td>\n<td>\n<ul>\n<li>USB Type-C x 1<\/li>\n<li>SPI x 1<\/li>\n<li>GROVE I2C(HY2.0-4) x 1<\/li>\n<li>UART x 2<\/li>\n<li>I2S(SCLK, WS, MCLK, IN, OUT) x 1<\/li>\n<li>microSD slot x 1<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"r_td30\">\n<p>Inertial measurement sensor<\/p>\n<\/td>\n<td>\n<ul>\n<li>MPU6886:Six axes (three acceleration axes and three gyro (angular rate) axes)<\/li>\n<li>BMM150:Geomagnetic 3-axis<\/li>\n<\/ul>\n<p>Early model was MPU9250, but changed to MPU6886 + BMM150 combination around 2019.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"r_td30\">\n<p>input device<\/p>\n<\/td>\n<td>\n<ul>\n<li>Keyboard<\/li>\n<li>Numeric keypad<\/li>\n<li>Game console-style interface panel<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Built-in speaker<\/p>\n<\/td>\n<td>\n<p>1W<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Built-in battery<\/p>\n<\/td>\n<td>\n<p>3.7V \/ 150mAh<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"4_M5Stack_FIRE\"><\/span>4. M5Stack FIRE<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>This is the equivalent of M5Stack Gray with 9-axis sensor, enhanced memory to 4M PSRAM, LED BAR (RGB LED x 10) and Charge Base for charging.<\/p>\n\n\n\n<p>The interface is different from the M5Stack Gray, and there is a hole on the back side of the main body that can be jointed with Lego.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-05.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-05.jpg?resize=234%2C234&#038;ssl=1\" alt=\"M5Stack Fire\" class=\"wp-image-21076\" width=\"234\" height=\"234\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-05.jpg?w=468&amp;ssl=1 468w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-05.jpg?resize=300%2C300&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-05.jpg?resize=150%2C150&amp;ssl=1 150w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-05.jpg?resize=80%2C80&amp;ssl=1 80w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-05.jpg?resize=320%2C320&amp;ssl=1 320w\" sizes=\"auto, (max-width: 234px) 100vw, 234px\" \/><\/a><\/figure>\n\n\n<figure class=\"wp-block-table is-style-regular\">\n<table class=\"r_table01\">\n<tbody>\n<tr>\n<td class=\"r_td30\">\n<p>On-board chip<\/p>\n<\/td>\n<td>\n<p>ESP32 240MHz dual core<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"r_td30\">\n<p>Memory<\/p>\n<\/td>\n<td>\n<p>520KB SRAM, 4M PSRAM<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Flash Memory<\/p>\n<\/td>\n<td>\n<p>16M FLASH<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"r_td30\">\n<p>Display<\/p>\n<\/td>\n<td>\n<p>320 x 240 color TFT LCD(2.0 inch)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Network<\/p>\n<\/td>\n<td>\n<p>Wi-Fi, dual mode Bluetooth<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Input<\/p>\n<\/td>\n<td>\n<p>&nbsp;5.0V \/ 500mA(USB Type-C)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Interface<\/p>\n<\/td>\n<td>\n<ul>\n<li>USB Type-C x 1<\/li>\n<li>GROVE x 3(I2C, I\/O,&nbsp; ART)<\/li>\n<li>POGO PIN x 1(Connecting to Charge Base\uff09<\/li>\n<li>microSD Slot X 1<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"r_td30\">\n<p>Inertial measurement sensor<\/p>\n<\/td>\n<td>\n<ul>\n<li>MPU6886:Six axes(three acceleration axes and three gyro (angular rate) axes)<\/li>\n<li>BMM150:Geomagnetic 3-axis<\/li>\n<\/ul>\n<p>Early model was MPU6050+MAG3110, but it was changed to MPU9250, and the latest model is MPU6886+BMM150 combination.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>LED<\/p>\n<\/td>\n<td>\n<p>LED BAR(RGB LED x 10)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Built-in speaker<\/p>\n<\/td>\n<td>\n<p>1W<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Built-in battery<\/p>\n<\/td>\n<td>\n<p>3.7V \/ 550mAh<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"5_M5GO_IoT_Starter_Kit\"><\/span>5. M5GO IoT Starter Kit<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>This is a set equivalent to M5stack Gray with various sensors such as temperature\/humidity measurement and infrared.<\/p>\n\n\n\n<p>Parts for compatibility with LEGO are also included, so you can combine it with LEGO MINDSTORMS EV3.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-08.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-08.jpg?resize=235%2C230&#038;ssl=1\" alt=\"M5GO IoT Starter Kit\" class=\"wp-image-21083\" width=\"235\" height=\"230\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-08.jpg?w=470&amp;ssl=1 470w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-08.jpg?resize=300%2C294&amp;ssl=1 300w\" sizes=\"auto, (max-width: 235px) 100vw, 235px\" \/><\/a><\/figure>\n\n\n<figure class=\"wp-block-table is-style-regular\">\n<table class=\"r_table01\">\n<tbody>\n<tr>\n<td class=\"r_td30\">\n<p>On-board chip<\/p>\n<\/td>\n<td>\n<p>ESP32 240MHz dual core<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"r_td30\">\n<p>Memory<\/p>\n<\/td>\n<td>\n<p>520KB SRAM<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Flash Memory<\/p>\n<\/td>\n<td>\n<p>16M FLASH<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"r_td30\">\n<p>Display<\/p>\n<\/td>\n<td>\n<p>320 x 240 color TFT LCD(2.0 inch)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Network<\/p>\n<\/td>\n<td>\n<p>Wi-Fi, dual mode Bluetooth<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Input<\/p>\n<\/td>\n<td>\n<p>&nbsp;5.0V \/ 500mA(USB Type-C)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Interface<\/p>\n<\/td>\n<td>\n<ul>\n<li>USB Type-C x 1<\/li>\n<li>GROVE x 3(I2C, I\/O, UART)<\/li>\n<li>POGO PIN x 1<\/li>\n<li>microSD Slot x 1<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"r_td30\">\n<p>Inertial measurement sensor<\/p>\n<\/td>\n<td>\n<p>MPU9250:9-axis sensor(3-axis acceleration, 3-axis gyro (angular velocity), and 3-axis geomagnetic)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>LED<\/p>\n<\/td>\n<td>\n<p>LED BAR(RGB LED x 10)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Built-in speaker<\/p>\n<\/td>\n<td>\n<p>1W<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Microphone<\/p>\n<\/td>\n<td>\n<p>Microphone<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Built-in battery<\/p>\n<\/td>\n<td>\n<p>3.7V \/ 550mAh<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Attached sensor<\/p>\n<\/td>\n<td>\n<ul>\n<li>ENV Sensor(Temperature, humidity, air pressure)<\/li>\n<li>IR Romote(Infrared rays)<\/li>\n<li>RGB LED(LED lights up)<\/li>\n<li>Motion Sensor(Motion sensor)<\/li>\n<li>ANGLE Sensor(The position of the knob changes the numerical value and the amount of light emitted by the side LEDs.)<\/li>\n<li>Hub<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"6_M5Stack_Core2\"><\/span>6. M5Stack Core2<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>This is an enhanced version of the original generation Core released in September 2020.<\/p>\n\n\n\n<p>Compared to M5Stack Gray, it has 8M PSRAM, touch screen, no magnetometer (only 6-axis accelerometer and gyroscope), vibration motor vibration, microphone, real-time clock, etc.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-09.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-09.jpg?resize=233%2C235&#038;ssl=1\" alt=\"CORE2\" class=\"wp-image-21086\" width=\"233\" height=\"235\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-09.jpg?w=466&amp;ssl=1 466w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-09.jpg?resize=297%2C300&amp;ssl=1 297w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-09.jpg?resize=150%2C150&amp;ssl=1 150w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-09.jpg?resize=80%2C80&amp;ssl=1 80w\" sizes=\"auto, (max-width: 233px) 100vw, 233px\" \/><\/a><\/figure>\n\n\n<figure class=\"wp-block-table is-style-regular\">\n<table class=\"r_table01\">\n<tbody>\n<tr>\n<td class=\"r_td30\">\n<p>On-board chip<\/p>\n<\/td>\n<td>\n<p>ESP32 D0WD-V3 240MHz dual core<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"r_td30\">\n<p>Memory<\/p>\n<\/td>\n<td>\n<p>520KB SRAM, 8M PSRAM<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Flash Memory<\/p>\n<\/td>\n<td>\n<p>16M FLASH<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"r_td30\">\n<p>Display<\/p>\n<\/td>\n<td>\n<p>320\u00d7240 Color TFT LCD(2.0 inch)<\/p>\n<p>Touch Screen(T6336U)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Network<\/p>\n<\/td>\n<td>\n<p>Wi-Fi, dual mode Bluetooth<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Input<\/p>\n<\/td>\n<td>\n<p>&nbsp;5.0V \/ 500mA(USB Type-C)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Interface<\/p>\n<\/td>\n<td>\n<ul>\n<li>USB Type-C x 1<\/li>\n<li>GROVE x 3(I2C, I\/O, UART)<\/li>\n<li>microSD Slot X 1<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"r_td30\">\n<p>Inertial measurement sensor<\/p>\n<\/td>\n<td>\n<p>MPU6886:Six axes(three acceleration axes and three gyro (angular rate) axes)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"r_td30\">\n<p>Other<\/p>\n<\/td>\n<td>\n<ul>\n<li>Vibration function by vibration motor<\/li>\n<li>Microphone (SPM1423)<\/li>\n<li>Real-time clock (RTC BM8563)<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>LED<\/p>\n<\/td>\n<td>\n<p>Power indicator light (green)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Built-in speaker<\/p>\n<\/td>\n<td>\n<p>1W<\/p>\n<p>I2S Power Amplifier (NS4168)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Built-in battery<\/p>\n<\/td>\n<td>\n<p>3.7V \/ 390mAh(Lithium battery)<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"7_M5Stack_UnitV2\"><\/span>7. M5Stack UnitV2<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>An AI recognition module for Edge computing with a built-in 1080P camera.<br>The OS is Linux.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-12.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"465\" height=\"468\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-12.jpg?resize=465%2C468&#038;ssl=1\" alt=\"M5Stack UnitV2\" class=\"wp-image-21094\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-12.jpg?w=465&amp;ssl=1 465w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-12.jpg?resize=298%2C300&amp;ssl=1 298w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-12.jpg?resize=150%2C150&amp;ssl=1 150w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-12.jpg?resize=80%2C80&amp;ssl=1 80w\" sizes=\"auto, (max-width: 465px) 100vw, 465px\" \/><\/a><\/figure>\n\n\n<figure class=\"wp-block-table is-style-regular\">\n<table class=\"r_table01\">\n<tbody>\n<tr>\n<td class=\"r_td30\">\n<p>On-board chip<\/p>\n<\/td>\n<td>\n<p>SigmaStar SSD202D (Dual Cortex-A7 1.2Ghz Processor)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"r_td30\">\n<p>Memory<\/p>\n<\/td>\n<td>\n<p>128MB DDR3<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Flash Memory<\/p>\n<\/td>\n<td>\n<p>512MB NAND Flash<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Camera<\/p>\n<\/td>\n<td>\n<p>GC2145 1080P Colored Sensor<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Power Input<\/p>\n<\/td>\n<td>\n<p>5V @ 500mA<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Peripherals<\/p>\n<\/td>\n<td>\n<p>USB Type-C x 1, UART x 1, TFCard x 1, Button x 1<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Network<\/p>\n<\/td>\n<td>\n<p>Wi-F (150Mbps 2.4GHz 802.11 b\/g\/n)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Microphone<\/p>\n<\/td>\n<td>\n<p>Microphone<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"M5Stick_Series\"><\/span>M5Stick Series<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>The M5Stick series are mainly sold in the following products.<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>M5StickC<\/li><li>M5stickC Plus<\/li><\/ol>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"1_M5StickC\"><\/span>1. M5StickC<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>It is a smaller version of the M5Stack with slightly lower specifications, but it includes an IMU (inertial measurement unit) and is recommended as a first IoT device.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-10.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-10.jpg?resize=231%2C233&#038;ssl=1\" alt=\"M5StickC\" class=\"wp-image-21087\" width=\"231\" height=\"233\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-10.jpg?w=462&amp;ssl=1 462w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-10.jpg?resize=297%2C300&amp;ssl=1 297w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-10.jpg?resize=150%2C150&amp;ssl=1 150w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-10.jpg?resize=80%2C80&amp;ssl=1 80w\" sizes=\"auto, (max-width: 231px) 100vw, 231px\" \/><\/a><\/figure>\n\n\n<figure class=\"wp-block-table is-style-regular\">\n<table class=\"r_table01\">\n<tbody>\n<tr>\n<td class=\"r_td30\">\n<p>On-board chip<\/p>\n<\/td>\n<td>\n<p>ESP32-PICO 240MHz dual core<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"r_td30\">\n<p>Memory<\/p>\n<\/td>\n<td>\n<p>520KB SRAM<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Flash Memory<\/p>\n<\/td>\n<td>\n<p>4M FLASH<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"r_td30\">\n<p>Display<\/p>\n<\/td>\n<td>\n<p>80\u00d7160 Color TFT LCD(0.96 inch)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Network<\/p>\n<\/td>\n<td>\n<p>Wi-Fi, dual mode Bluetooth<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Input<\/p>\n<\/td>\n<td>\n<p>5.0V@500mA(USB Type-C)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Interface<\/p>\n<\/td>\n<td>\n<ul>\n<li>USB Type-C x 1<\/li>\n<li>HY2.0-4P(Grove compatible connector) x 1<\/li>\n<li>Extension Connectors<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"r_td30\">\n<p>Inertial measurement sensor<\/p>\n<\/td>\n<td>\n<p>MPU6886:Six axes(three acceleration axes and three gyro (angular rate) axes)<\/p>\n<p>Initially it was SH200Q, but switched to MPU6886 around 2019.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"r_td30\">\n<p>Other<\/p>\n<\/td>\n<td>\n<p>Infrared transmission<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>LED<\/p>\n<\/td>\n<td>\n<p>Red LED x 1<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Microphone<\/p>\n<\/td>\n<td>\n<p>Built-in Microphone<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Built-in battery<\/p>\n<\/td>\n<td>\n<p>80mAh Lithium-ion polymer battery<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"2_M5StickC_Plus\"><\/span>2. M5StickC Plus<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Compared to the M5stickC, this version has a larger screen, more battery capacity, and an added buzzer.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-11.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-11.jpg?resize=232%2C231&#038;ssl=1\" alt=\"M5StickC Plus\" class=\"wp-image-21089\" width=\"232\" height=\"231\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-11.jpg?w=464&amp;ssl=1 464w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-11.jpg?resize=300%2C298&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-11.jpg?resize=150%2C150&amp;ssl=1 150w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-11.jpg?resize=80%2C80&amp;ssl=1 80w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-11.jpg?resize=320%2C320&amp;ssl=1 320w\" sizes=\"auto, (max-width: 232px) 100vw, 232px\" \/><\/a><\/figure>\n\n\n<figure class=\"wp-block-table is-style-regular\">\n<table class=\"r_table01\">\n<tbody>\n<tr>\n<td class=\"r_td30\">\n<p>On-board chip<\/p>\n<\/td>\n<td>\n<p>ESP32-PICO-D4 240MHz dual core<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"r_td30\">\n<p>Memory<\/p>\n<\/td>\n<td>\n<p>520KB SRAM<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Flash Memory<\/p>\n<\/td>\n<td>\n<p>4M FLASH<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"r_td30\">\n<p>Display<\/p>\n<\/td>\n<td>\n<p>135x 240 color TFT LCD(1.14 inch)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Network<\/p>\n<\/td>\n<td>\n<p>Wi-Fi, dual mode Bluetooth<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Input<\/p>\n<\/td>\n<td>\n<p>5.0V@500mA(USB Type-C)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Interface<\/p>\n<\/td>\n<td>\n<ul>\n<li>USB Type-C x 1<\/li>\n<li>HY2.0-4P(Grove compatible connector) x 1<\/li>\n<li>Extension Connectors<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"r_td30\">\n<p>Inertial measurement sensor<\/p>\n<\/td>\n<td>\n<p>MPU6886:Six axes(three acceleration axes and three gyro (angular rate) axes)<\/p>\n<p>Initially it was SH200Q, but switched to MPU6886 around 2019.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"r_td30\">\n<p>Other<\/p>\n<\/td>\n<td>\n<ul>\n<li>Infrared transmission<\/li>\n<li>buzzer<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>LED<\/p>\n<\/td>\n<td>\n<p>Red LED x 1<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Microphone<\/p>\n<\/td>\n<td>\n<p>Built-in Microphone<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Built-in battery<\/p>\n<\/td>\n<td>\n<p>120mAh@3.7V<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"programming_environment\"><\/span>programming environment<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Back to programming with the M5StickC.<\/p>\n\n\n\n<p>In creating a simple test program, I looked into the programming environment.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Environment\"><\/span>Environment<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>My environment is as follows<\/p>\n\n\n<figure class=\"wp-block-table is-style-regular\">\n<table class=\"r_table01\">\n<tbody>\n<tr>\n<td class=\"r_td30\">\n<p>OS<\/p>\n<\/td>\n<td>\n<p>Windows10 Home Version 1903<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>PC<\/p>\n<\/td>\n<td>\n<p>DELL G7 15 7588<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>CPU<\/p>\n<\/td>\n<td>\n<p>CoreTM i7-8750H<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Selecting_a_development_environment_and_programming_language\"><\/span>Selecting a development environment and programming language<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>The most common development environment and language is C\/C++ with Arduino IDE.<\/p>\n\n\n\n<p>It seems that MicroPython can be used as well, so I did some research on the net, but there were not that many sample sources in Python related to the M5Stack.<\/p>\n\n\n\n<p>I don&#8217;t know much about C, so I would have preferred to use Python, which is a little better, but I feel that this kind of choice is often easier if you have a lot of reference material and sample code, even if you are not good at the language.<\/p>\n\n\n\n<p>I think I can do C\/C++ while I&#8217;m at it, so I&#8217;m going to install the Arduino IDE.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Download_the_Arduino_IDE\"><\/span>Download the Arduino IDE<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p><a href=\"https:\/\/www.arduino.cc\/en\/software\" target=\"_blank\" rel=\"noreferrer noopener\">Go to this page<\/a> and click on &#8220;Windows Win7 and newer&#8221; in the &#8220;DOWNLOAD OPTIONS&#8221; section on the right.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a class=\"r_image\" href=\"https:\/\/www.souichi.club\/?attachment_id=17780\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-11.png?resize=768%2C361&#038;ssl=1\" alt=\"Download the Arduino IDE\" class=\"wp-image-17780\" width=\"768\" height=\"361\" title=\"Arduino IDE\u306e\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-11.png?resize=1024%2C481&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-11.png?resize=300%2C141&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-11.png?resize=768%2C361&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-11.png?resize=520%2C245&amp;ssl=1 520w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-11.png?w=1280&amp;ssl=1 1280w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/a><\/figure>\n\n\n\n<p>If you want to donate to the download, select the amount and click the &#8220;CONTRIBUTE &amp; DOWNLOAD&#8221; button to make a PayPal donation.<\/p>\n\n\n\n<p>I clicked on the free &#8220;JUST DOWNLOAD&#8221; button.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-12.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-12.png?resize=768%2C375&#038;ssl=1\" alt=\"Just Download\" class=\"wp-image-17781\" width=\"768\" height=\"375\" title=\"\u7121\u6599\u7248\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-12.png?resize=1024%2C500&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-12.png?resize=300%2C146&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-12.png?resize=768%2C375&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-12.png?w=1280&amp;ssl=1 1280w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/a><\/figure>\n\n\n\n<p>Save the &#8220;arduino-1.8.13-windows.exe&#8221; file to your local disk.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Launch_the_installer\"><\/span>Launch the installer<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Run the downloaded arduino-1.8.13-windows.exe and click &#8220;I Agree&#8221; when the GNU license is displayed.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-13.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-13.png?resize=394%2C271&#038;ssl=1\" alt=\"I Agree\" class=\"wp-image-17782\" width=\"394\" height=\"271\" title=\"\u30e9\u30a4\u30bb\u30f3\u30b9\u78ba\u8a8d\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-13.png?w=525&amp;ssl=1 525w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-13.png?resize=300%2C206&amp;ssl=1 300w\" sizes=\"auto, (max-width: 394px) 100vw, 394px\" \/><\/a><\/figure>\n\n\n\n<p>When the installation options are displayed, confirm them and click the &#8220;Next&#8221; button.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-15.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-15.png?resize=394%2C271&#038;ssl=1\" alt=\"select Install options\" class=\"wp-image-17784\" width=\"394\" height=\"271\" title=\"\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u9078\u629e\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-15.png?w=525&amp;ssl=1 525w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-15.png?resize=300%2C206&amp;ssl=1 300w\" sizes=\"auto, (max-width: 394px) 100vw, 394px\" \/><\/a><\/figure>\n\n\n\n<p>Confirm the destination folder and click the &#8220;Install&#8221; button.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-16.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-16.png?resize=393%2C271&#038;ssl=1\" alt=\"Install\" class=\"wp-image-17785\" width=\"393\" height=\"271\" title=\"\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u958b\u59cb\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-16.png?w=524&amp;ssl=1 524w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-16.png?resize=300%2C207&amp;ssl=1 300w\" sizes=\"auto, (max-width: 393px) 100vw, 393px\" \/><\/a><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Install_additional_software\"><\/span>Install additional software<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>You will be asked to install the Adafruit Industries LLC port device software, click the &#8220;Install&#8221; button.<\/p>\n\n\n\n<p>*Screen shots are for Windows in a Japanese environment.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-13.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-13.jpg?resize=548%2C233&#038;ssl=1\" alt=\"Adafruit Device Software install\" class=\"wp-image-21099\" width=\"548\" height=\"233\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-13.jpg?w=731&amp;ssl=1 731w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-13.jpg?resize=300%2C128&amp;ssl=1 300w\" sizes=\"auto, (max-width: 548px) 100vw, 548px\" \/><\/a><\/figure>\n\n\n\n<p>You will be asked to install the USB driver for Arduino srl.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-14.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-14.jpg?resize=510%2C220&#038;ssl=1\" alt=\"Arduino USB Driver\" class=\"wp-image-21100\" width=\"510\" height=\"220\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-14.jpg?w=680&amp;ssl=1 680w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-14.jpg?resize=300%2C129&amp;ssl=1 300w\" sizes=\"auto, (max-width: 510px) 100vw, 510px\" \/><\/a><\/figure>\n\n\n\n<p>Next, you will be asked to install the Ardiuno LLC USB driver, so click the &#8220;Install&#8221; button.<\/p>\n\n\n\n<p>I don&#8217;t know why there are two USB drivers, one from Arduino srl (Italy) and the other from Ardiuno LLC (USA), but it may be a remnant of a previous split (settled in 2016).<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-15.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-15.jpg?resize=516%2C220&#038;ssl=1\" alt=\"Arduino USB Driver Install\" class=\"wp-image-21101\" width=\"516\" height=\"220\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-15.jpg?w=688&amp;ssl=1 688w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-15.jpg?resize=300%2C128&amp;ssl=1 300w\" sizes=\"auto, (max-width: 516px) 100vw, 516px\" \/><\/a><\/figure>\n\n\n\n<p>When the installation is finished, click the &#8220;Close&#8221; button.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-22.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-22.png?resize=395%2C272&#038;ssl=1\" alt=\"\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u7d42\u4e86\" class=\"wp-image-17792\" width=\"395\" height=\"272\" title=\"\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u7d42\u4e86\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-22.png?w=526&amp;ssl=1 526w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-22.png?resize=300%2C206&amp;ssl=1 300w\" sizes=\"auto, (max-width: 395px) 100vw, 395px\" \/><\/a><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Preparing_the_operating_environment\"><\/span>Preparing the operating environment<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>After installing the Arduino IDE, install the libraries necessary for programming the M5StickC.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Add_a_board_manager\"><\/span>Add a board manager<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Start the Arduino IDE and select &#8220;File&#8221; -&gt; &#8220;Preferences&#8221;.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-16.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-16.jpg?resize=768%2C566&#038;ssl=1\" alt=\"Preferences\" class=\"wp-image-21103\" width=\"768\" height=\"566\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-16.jpg?resize=1024%2C754&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-16.jpg?resize=300%2C221&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-16.jpg?resize=768%2C565&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-16.jpg?w=1206&amp;ssl=1 1206w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/a><\/figure>\n\n\n\n<p>Enter the following in the &#8220;Additional Boards Manager URLs&#8221;<\/p>\n\n\n<pre><code class=\"lang-shell\">https:\/\/dl.espressif.com\/dl\/package_esp32_index.json<\/code><\/pre>\n\n\n<p>Click the &#8220;OK&#8221; button, and ESP32 will be recognized.<\/p>\n\n\n\n<p>If you want to specify more than one board manager, separate them with &#8220;,&#8221; (comma).<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-17.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-17.jpg?resize=602%2C403&#038;ssl=1\" alt=\"Additional Boards Manager URL\uff53\" class=\"wp-image-21104\" width=\"602\" height=\"403\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-17.jpg?w=802&amp;ssl=1 802w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-17.jpg?resize=300%2C201&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-17.jpg?resize=768%2C514&amp;ssl=1 768w\" sizes=\"auto, (max-width: 602px) 100vw, 602px\" \/><\/a><\/figure>\n\n\n\n<p>Next, select &#8220;Tools&#8221; -&gt; &#8220;Board&#8221; -&gt; &#8220;Boards Manager&#8221;.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-18.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-18.jpg?resize=768%2C572&#038;ssl=1\" alt=\"Boards Manager\" class=\"wp-image-21106\" width=\"768\" height=\"572\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-18.jpg?resize=1024%2C762&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-18.jpg?resize=300%2C223&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-18.jpg?resize=768%2C572&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-18.jpg?w=1202&amp;ssl=1 1202w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/a><\/figure>\n\n\n\n<p>Enter &#8220;esp32\u2033 in the search field to narrow down the results, and click the &#8220;Install&#8221; button.<\/p>\n\n\n\n<p>When the installation is finished, click the &#8220;Close&#8221; button to close it.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-19.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-19.jpg?resize=738%2C416&#038;ssl=1\" alt=\"esp32 Installed\" class=\"wp-image-21107\" width=\"738\" height=\"416\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-19.jpg?w=984&amp;ssl=1 984w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-19.jpg?resize=300%2C169&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-19.jpg?resize=768%2C432&amp;ssl=1 768w\" sizes=\"auto, (max-width: 738px) 100vw, 738px\" \/><\/a><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Installing_the_library\"><\/span>Installing the library<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Next, install the necessary libraries.<\/p>\n\n\n\n<p>Select &#8220;Sketch&#8221; -&gt; &#8220;Include Library&#8221; -&gt; &#8220;Manage Libraries&#8221; from the menu.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-20.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-20.jpg?resize=768%2C578&#038;ssl=1\" alt=\"Manage Libraries\" class=\"wp-image-21108\" width=\"768\" height=\"578\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-20.jpg?resize=1024%2C770&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-20.jpg?resize=300%2C226&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-20.jpg?resize=768%2C577&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-20.jpg?w=1200&amp;ssl=1 1200w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/a><\/figure>\n\n\n\n<p>Search for &#8220;M5StickC&#8221; in the search field and click the &#8220;Install&#8221; button to install the M5StickC library.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-21.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-21.jpg?resize=738%2C416&#038;ssl=1\" alt=\"M5StickC Library\" class=\"wp-image-21109\" width=\"738\" height=\"416\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-21.jpg?w=984&amp;ssl=1 984w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-21.jpg?resize=300%2C169&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-21.jpg?resize=768%2C432&amp;ssl=1 768w\" sizes=\"auto, (max-width: 738px) 100vw, 738px\" \/><\/a><\/figure>\n\n\n\n<p>In the same way, narrow down the search field to &#8220;FastLED&#8221; and click the &#8220;Install&#8221; button to install the FastLED library.<\/p>\n\n\n\n<p>This library is used in the sample application at the factory, so you need to install it.<\/p>\n\n\n\n<p>When the installation is finished, click the &#8220;Close&#8221; button to close the application.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-22.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-22.jpg?resize=738%2C416&#038;ssl=1\" alt=\"fastLED Library Installed\" class=\"wp-image-21111\" width=\"738\" height=\"416\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-22.jpg?w=984&amp;ssl=1 984w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-22.jpg?resize=300%2C169&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-22.jpg?resize=768%2C432&amp;ssl=1 768w\" sizes=\"auto, (max-width: 738px) 100vw, 738px\" \/><\/a><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Checking_the_COM_port\"><\/span>Checking the COM port<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>When the M5StickC is connected to the PC via USB, the COM port will be recognized and the number should be checked.<\/p>\n\n\n\n<p>Right-click on the Windows Start button and select Device Manager.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-23.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-23.jpg?resize=234%2C416&#038;ssl=1\" alt=\"Device Manager\" class=\"wp-image-21113\" width=\"234\" height=\"416\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-23.jpg?w=468&amp;ssl=1 468w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-23.jpg?resize=169%2C300&amp;ssl=1 169w\" sizes=\"auto, (max-width: 234px) 100vw, 234px\" \/><\/a><\/figure>\n\n\n\n<p>When you connect the M5StickC to your computer via USB, you will see COM8 (may change depending on your environment), so you know it is COM8.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-24.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-24.jpg?resize=732%2C536&#038;ssl=1\" alt=\"Ports COM8\" class=\"wp-image-21115\" width=\"732\" height=\"536\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-24.jpg?w=976&amp;ssl=1 976w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-24.jpg?resize=300%2C220&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-24.jpg?resize=768%2C563&amp;ssl=1 768w\" sizes=\"auto, (max-width: 732px) 100vw, 732px\" \/><\/a><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Selecting_a_board\"><\/span>Selecting a board<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Next, select &#8220;Tools&#8221; -&gt; &#8220;Board&#8221; -&gt; &#8220;ESP32 Arduino&#8221; -&gt; &#8220;M5Stick-C&#8221; from the Arduino IDE menu.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-26.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"762\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-26.jpg?resize=1024%2C762&#038;ssl=1\" alt=\"select M5StickC\" class=\"wp-image-21116\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-26.jpg?resize=1024%2C762&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-26.jpg?resize=300%2C223&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-26.jpg?resize=768%2C572&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-26.jpg?w=1204&amp;ssl=1 1204w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/a><\/figure>\n\n\n\n<p>The Upload Speed will change to 1500000 (if it hasn&#8217;t changed, change it manually), then select &#8220;Tools&#8221; &gt; &#8220;Partition Scheme&#8221; &gt; &#8220;No OTA (Large APP)&#8221;.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-27.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-27.jpg?resize=768%2C572&#038;ssl=1\" alt=\"No OTA\" class=\"wp-image-21117\" width=\"768\" height=\"572\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-27.jpg?resize=1024%2C763&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-27.jpg?resize=300%2C224&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-27.jpg?resize=768%2C572&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-27.jpg?w=1200&amp;ssl=1 1200w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/a><\/figure>\n\n\n\n<p>OTA (Over the Air) is a function to upgrade programs over the network.<\/p>\n\n\n\n<p>Since the old and new programs are temporarily loaded into the memory, it requires twice as much free memory as the program size.<\/p>\n\n\n\n<p>There is no problem with the size of the program we are going to test.<\/p>\n\n\n\n<p>When I compile the program to revert to the factory-installed program, the following message appears if OTA is enabled.<\/p>\n\n\n<pre><code class=\"lang-shell\">The program size (1338029 bytes) is greater than maximum allowed (1310720 bytes)<\/code><\/pre>\n\n\n<p>The above message appears and I get an error.<\/p>\n\n\n\n<p>There is a setting to expand the program area in memory to more than 1.3 MByte, but I decided to disable OTA to deal with it this time.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Selecting_a_port\"><\/span>Selecting a port<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Set the COM port (COM8) that you have just checked.<\/p>\n\n\n\n<p>Select &#8220;Tools&#8221; -&gt; &#8220;Port&#8221; &gt; &#8220;COM8\u2033 from the menu.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-28.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-28.jpg?resize=768%2C572&#038;ssl=1\" alt=\"select COM Port\" class=\"wp-image-21118\" width=\"768\" height=\"572\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-28.jpg?resize=1024%2C762&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-28.jpg?resize=300%2C223&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-28.jpg?resize=768%2C571&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-28.jpg?w=1202&amp;ssl=1 1202w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/a><\/figure>\n\n\n\n<p>This completes the preliminary setup.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"test_program\"><\/span>test program<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Create a new program by selecting &#8220;File&#8221; &gt; &#8220;New&#8221; from the menu.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Specifications\"><\/span>Specifications<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>The specifications of the program for testing are as follows.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Use button A (M5 button) to turn the LED on and off (toggle).<\/li><li>When the LED is on, the display will show the word &#8220;LED ON&#8221;, and when it is off, the display will show the word &#8220;LED OFF&#8221;.<\/li><li>Button B toggles the display between &#8220;white text with black background&#8221; and &#8220;red text with white background&#8221;.<\/li><\/ul>\n\n\n<figure class=\"wp-block-table is-style-regular\">\n<table class=\"r_table01\">\n<tbody>\n<tr>\n<td class=\"r_td30\">\n<p>LED off(white text)<\/p>\n<\/td>\n<td><a href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-36.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"r_image alignnone wp-image-17814 size-medium\" title=\"LED off(white text)\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-36.jpg?resize=300%2C177&#038;ssl=1\" alt=\"LED off(white text)\" width=\"300\" height=\"177\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-36.jpg?resize=300%2C177&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-36.jpg?resize=1024%2C604&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-36.jpg?resize=768%2C453&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-36.jpg?w=1280&amp;ssl=1 1280w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/td>\n<\/tr>\n<tr>\n<td>\n<p>LED on(white text)<\/p>\n<\/td>\n<td><a href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-37.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"r_image alignnone wp-image-17815 size-medium\" title=\"LED on(white text)\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-37.jpg?resize=300%2C173&#038;ssl=1\" alt=\"LED on(white text)\" width=\"300\" height=\"173\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-37.jpg?resize=300%2C173&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-37.jpg?resize=1024%2C592&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-37.jpg?resize=768%2C444&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-37.jpg?w=1280&amp;ssl=1 1280w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/td>\n<\/tr>\n<tr>\n<td>\n<p>LED off(red text)<\/p>\n<\/td>\n<td><a href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-38.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"r_image alignnone wp-image-17816 size-medium\" title=\"LED off(red text)\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-38.jpg?resize=300%2C169&#038;ssl=1\" alt=\"LED off(red text)\" width=\"300\" height=\"169\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-38.jpg?resize=300%2C169&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-38.jpg?resize=1024%2C575&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-38.jpg?resize=768%2C431&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-38.jpg?w=1280&amp;ssl=1 1280w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/td>\n<\/tr>\n<tr>\n<td>\n<p>LED on(red text)<\/p>\n<\/td>\n<td><a href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-39.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"r_image alignnone wp-image-17817 size-medium\" title=\"LED on(red text)\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-39.jpg?resize=300%2C165&#038;ssl=1\" alt=\"LED on(red text)\" width=\"300\" height=\"165\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-39.jpg?resize=300%2C165&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-39.jpg?resize=1024%2C564&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-39.jpg?resize=768%2C423&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-39.jpg?w=1280&amp;ssl=1 1280w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"source-code\"><\/span>source-code<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>The source code for the program is as follows.<\/p>\n\n\n<pre class=\"line-numbers\"><code class=\"lang-cpp\">#include &lt;M5StickC.h&gt;\n\n#define LED_PIN   10\n\n#define LED_ON  LOW \/\/ LED on\n#define LED_OFF HIGH \/\/ LED off\n\nint led_flg = 0; \/\/ false\nint color_flg = 0; \/\/ false\n\nvoid setup() {\n  M5.begin();\n  pinMode(LED_PIN, OUTPUT);\n  digitalWrite(LED_PIN, LED_OFF); \/\/ LED off\n  led_flg = 0;\n  M5.Lcd.setRotation(1); \/\/ Change the direction of the LCD\n  M5.Lcd.setTextSize(2); \/\/ Double the font size.\n  M5.Lcd.setTextColor(WHITE, BLACK); \/\/ White for text, black for background\n  color_flg = 0;\n  M5.Lcd.setCursor(10,10);\n  M5.Lcd.print(\"LED OFF\"); \/\/ display LED OFF\n}\n\nvoid loop() {\n  M5.update();\n\n  if(M5.BtnA.wasPressed()){ \/\/ When button A is pressed\n    M5.Lcd.fillScreen(BLACK);\n    M5.Lcd.setCursor(10,10);\n    if (led_flg){ \/\/ If LED on\n      digitalWrite(LED_PIN, LED_OFF); \/\/ LED off\n      M5.Lcd.print(\"LED OFF\"); \/\/ display LED OFF\n      led_flg = 0;\n    } else { \/\/ \u6d88\u706f\u306a\u3089\n      digitalWrite(LED_PIN, LED_ON); \/\/ LED on \n      M5.Lcd.print(\"LED ON\"); \/\/ display LED ON\n      led_flg = 1;\n    }\n    delay(500);\n  }\n\n  if(M5.BtnA.wasReleased()){ \/\/ When button A is released\n    ;  \/\/ none \n  }\n\n  if(M5.BtnB.wasPressed()){ \/\/ When button B is pressed\n    if (color_flg){ \/\/ If text is red and background is white\n      M5.Lcd.setTextColor(WHITE, BLACK); \/\/ White for text, black for background\n      color_flg = 0;\n    } else { \/\/ White for text, black for background\n      M5.Lcd.setTextColor(RED, WHITE); \/\/ If text is white and background is black\n      color_flg = 1;\n    }\n    delay(500);\n  }\n\n  if(M5.BtnB.wasReleased()){ \/\/ When button B is released\n     ; \/\/ none\n  }\n\n}<\/code><\/pre>\n\n\n<p>I think there is a smarter way to do this than using flags to determine the state.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Compiling_and_Writing\"><\/span>Compiling and Writing<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Then, select &#8220;Sketch&#8221; -&gt; &#8220;Upload&#8221; from the menu.<\/p>\n\n\n\n<p>Compile and write the executable module to the M5StickC.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-29.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-29.jpg?resize=768%2C573&#038;ssl=1\" alt=\"Upload\" class=\"wp-image-21122\" width=\"768\" height=\"573\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-29.jpg?resize=1024%2C764&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-29.jpg?resize=300%2C224&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-29.jpg?resize=768%2C573&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-29.jpg?w=1204&amp;ssl=1 1204w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/a><\/figure>\n\n\n\n<p>When the writing was finished, the program ran, and I confirmed that it did what I wanted by pressing buttons A and B.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Restore_the_original_program\"><\/span>Restore the original program<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>When you write a new program, the original program will be lost, so if you want to return to the factory default program, follow the steps below.<\/p>\n\n\n\n<p>From the menu, select &#8220;File&#8221; &gt; &#8220;Open&#8221; to open the file.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-30.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-30.jpg?resize=768%2C574&#038;ssl=1\" alt=\"file open\" class=\"wp-image-21123\" width=\"768\" height=\"574\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-30.jpg?resize=1024%2C765&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-30.jpg?resize=300%2C224&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-30.jpg?resize=768%2C573&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-30.jpg?w=1200&amp;ssl=1 1200w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/a><\/figure>\n\n\n\n<p>Open &#8220;FactoryTest.ino&#8221; in the following folder under the folder where you installed the Arduino IDE library (&#8220;Documents&#8221; by default in Windows 10).<\/p>\n\n\n<pre><code class=\"lang-shell\">C:\u00a5Users\u00a5Your user name\u00a5Documents\u00a5Arduino\u00a5libraries\u00a5M5StickC\u00a5examples\u00a5Basics\u00a5FactoryTest\u00a5FactoryTest.ino<\/code><\/pre>\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-25.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-25.jpg?resize=557%2C474&#038;ssl=1\" alt=\"Open FactoryTest.ino\" class=\"wp-image-21125\" width=\"557\" height=\"474\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-25.jpg?w=743&amp;ssl=1 743w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-en-25.jpg?resize=300%2C255&amp;ssl=1 300w\" sizes=\"auto, (max-width: 557px) 100vw, 557px\" \/><\/a><\/figure>\n\n\n\n<p>After opening the file, select &#8220;Sketch&#8221; -&gt; &#8220;Upload&#8221; from the menu and write the program to the M5StickC to return it to the factory default state.<\/p>\n\n\n\n<p>This concludes this article.<\/p>\n\n\n<div class=\"postscript_balloon\">Finally.<\/div>\n\n\n<p>I hope this article will be useful to someone somewhere.<\/p>\n\n\n","protected":false},"excerpt":{"rendered":"<p>I got an M5StickC.<\/p>\n<p>M5StickC is a stick-type product from M5Stack Company, which is based on ESP32-PICO, the same architecture as ESP32.<\/p>\n","protected":false},"author":5,"featured_media":17772,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_locale":"en_US","_original_post":"https:\/\/www.souichi.club\/?p=17744","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[238],"tags":[137,242],"class_list":["post-21055","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-m5stack","tag-iot","tag-m5stickc","en-US"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/m5stickc-07.jpg?fit=1280%2C892&ssl=1","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.souichi.club\/wp-json\/wp\/v2\/posts\/21055","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.souichi.club\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.souichi.club\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.souichi.club\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.souichi.club\/wp-json\/wp\/v2\/comments?post=21055"}],"version-history":[{"count":2,"href":"https:\/\/www.souichi.club\/wp-json\/wp\/v2\/posts\/21055\/revisions"}],"predecessor-version":[{"id":24948,"href":"https:\/\/www.souichi.club\/wp-json\/wp\/v2\/posts\/21055\/revisions\/24948"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.souichi.club\/wp-json\/wp\/v2\/media\/17772"}],"wp:attachment":[{"href":"https:\/\/www.souichi.club\/wp-json\/wp\/v2\/media?parent=21055"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.souichi.club\/wp-json\/wp\/v2\/categories?post=21055"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.souichi.club\/wp-json\/wp\/v2\/tags?post=21055"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}