{"id":280,"date":"2018-08-14T11:46:49","date_gmt":"2018-08-14T03:46:49","guid":{"rendered":"http:\/\/www.inhhh.com\/blog\/?p=280"},"modified":"2018-08-14T11:47:22","modified_gmt":"2018-08-14T03:47:22","slug":"arduino-%e5%ae%89%e8%a3%85esp32%e5%bc%80%e5%8f%91%e7%8e%af%e5%a2%83%e8%8b%b1%e6%96%87%ef%bc%89","status":"publish","type":"post","link":"http:\/\/www.inhhh.com\/blog\/?p=280","title":{"rendered":"arduino \u5b89\u88c5ESP32\u5f00\u53d1\u73af\u5883(\u82f1\u6587\uff09"},"content":{"rendered":"<p class=\"ifp\">The\u00a0<a href=\"https:\/\/randomnerdtutorials.com\/getting-started-with-esp32\/\">ESP32<\/a>\u00a0is currently being\u00a0integrated\u00a0with the\u00a0Arduino IDE like it was done for the <a href=\"https:\/\/randomnerdtutorials.com\/how-to-install-esp8266-board-arduino-ide\/\">ESP8266<\/a>. There\u2019s an add-on for the Arduino IDE that allows you to program the ESP32 using the Arduino IDE and its programming language. In this tutorial we\u2019ll show you how to install the ESP32 board in the Arduino IDE for Windows. If you\u2019re using <a href=\"https:\/\/randomnerdtutorials.com\/installing-the-esp32-board-in-arduino-ide-mac-and-linux-instructions\/\">Mac Os or Linux follow these instructions<\/a> instead.\u00a0<span id=\"more-12142\"><\/span><\/p>\n<p>You may like:\u00a0<a href=\"https:\/\/makeradvisor.com\/esp32-vs-esp8266\/\" target=\"_blank\" rel=\"noopener noreferrer\">ESP32 vs ESP8266 \u2013 Pros and Cons<\/a><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-65460\" src=\"https:\/\/i2.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2016\/12\/instal-esp32-arduino-ide.jpg?resize=750%2C421&amp;ssl=1\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" srcset=\"https:\/\/i2.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2016\/12\/instal-esp32-arduino-ide.jpg?w=750&amp;ssl=1 750w, https:\/\/i2.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2016\/12\/instal-esp32-arduino-ide.jpg?resize=300%2C168&amp;ssl=1 300w\" alt=\"\" width=\"750\" height=\"421\" \/><\/p>\n<p>If you have any problems during the installation procedure, take a look at the <a href=\"https:\/\/randomnerdtutorials.com\/esp32-troubleshooting-guide\/\">ESP32 troubleshooting guide<\/a>.<\/p>\n<div class=\"code-block code-block-5\">\n<div class=\"clear\"><\/div>\n<div class=\"thrivecb teal\">\n<div class=\"shnd\"><strong>RECOMMENDED:<\/strong> <a href=\"https:\/\/randomnerdtutorials.com\/home-automation-using-esp8266-r\/\">Read our Home Automation using ESP8266 Course<\/a><\/div>\n<\/div>\n<\/div>\n<p><em>If you like the ESP32, enroll in our brand new course: <a href=\"https:\/\/randomnerdtutorials.com\/learn-esp32-with-arduino-ide\/\">Learn ESP32 with Arduino IDE<\/a>.<\/em><\/p>\n<p>Recommended reading:\u00a0<a href=\"https:\/\/randomnerdtutorials.com\/getting-started-with-esp32\/\">Getting Started with ESP32 Dev Module<\/a>.<\/p>\n<h2>Installing the ESP32 Add-on on Arduino IDE<\/h2>\n<p><strong>Important:<\/strong>\u00a0before starting this installation procedure, make sure you have the latest version of the Arduino IDE installed in your computer. If you don\u2019t, uninstall it and install it again. Otherwise, it may not work.\u00a0Having the latest Arduino IDE software installed from <a href=\"https:\/\/www.arduino.cc\/en\/Main\/Software\" target=\"_blank\" rel=\"noopener noreferrer\">arduino.cc\/en\/Main\/Software<\/a>, continue with this tutorial.<\/p>\n<p><strong>IMPORTANT NOTE<\/strong>:<\/p>\n<ol>\n<li>If this is your first time installing the ESP32 on the Arduino IDE, simply follow the installation procedure described below;<\/li>\n<li>If you\u2019ve already installed the ESP32 add-on using the old method, you should remove the <em>espressif<\/em>\u00a0folder first. Go to the end of this post to learn how to remove the <em>espressif<\/em>\u00a0folder.<\/li>\n<\/ol>\n<h2>1. Installing the ESP32 Board<\/h2>\n<p>To install the ESP32 board in your Arduino IDE, follow these next instructions:<\/p>\n<div class=\"code-block code-block-9\">\n<div class=\"clear\"><\/div>\n<div class=\"thrivecb blue\">\n<div class=\"shnd\"><strong>DOWNLOAD FREE PDF:<\/strong> <span class=\"tve-leads-two-step-trigger tl-2step-trigger-15601\"><a>Arduino eBook with 18+ Projects<\/a><\/span><\/div>\n<\/div>\n<\/div>\n<p>1) Open the preferences window from the Arduino IDE. Go to <b>Arduino\u00a0<\/b>&gt; <strong>Preferences<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-65438\" src=\"https:\/\/i2.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2016\/12\/arduino-ide-open-preferences.png?resize=196%2C340&amp;ssl=1\" sizes=\"auto, (max-width: 196px) 100vw, 196px\" srcset=\"https:\/\/i2.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2016\/12\/arduino-ide-open-preferences.png?w=196&amp;ssl=1 196w, https:\/\/i2.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2016\/12\/arduino-ide-open-preferences.png?resize=173%2C300&amp;ssl=1 173w\" alt=\"\" width=\"196\" height=\"340\" \/><\/p>\n<p>2) Enter<strong>\u00a0https:\/\/dl.espressif.com\/dl\/package_esp32_index.json<\/strong> into the \u201cAdditional Board Manager URLs\u201d field as shown in the figure below. Then, click the \u201cOK\u201d button:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-68691\" src=\"https:\/\/i1.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/06\/preferences.png?resize=722%2C607&amp;ssl=1\" sizes=\"auto, (max-width: 722px) 100vw, 722px\" srcset=\"https:\/\/i1.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/06\/preferences.png?w=722&amp;ssl=1 722w, https:\/\/i1.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/06\/preferences.png?resize=300%2C252&amp;ssl=1 300w\" alt=\"\" width=\"722\" height=\"607\" \/><\/p>\n<p><strong>Note:<\/strong> if you already have the ESP8266 boards URL, you can separate the URLs with a comma as follows:<\/p>\n<pre>https:\/\/dl.espressif.com\/dl\/package_esp32_index.json, \r\nhttp:\/\/arduino.esp8266.com\/stable\/package_esp8266com_index.json<\/pre>\n<p>3) Open boards manager. Go to <strong>Tools<\/strong> &gt; <strong>Board<\/strong> &gt; <strong>Boards Manager\u2026<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-68686\" src=\"https:\/\/i1.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/06\/boardsManager.png?resize=628%2C568&amp;ssl=1\" sizes=\"auto, (max-width: 628px) 100vw, 628px\" srcset=\"https:\/\/i1.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/06\/boardsManager.png?w=628&amp;ssl=1 628w, https:\/\/i1.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/06\/boardsManager.png?resize=300%2C271&amp;ssl=1 300w\" alt=\"\" width=\"628\" height=\"568\" \/><\/p>\n<p>4) Search for ESP32 and press install button for the \u201c<strong>ESP32 by Espressif Systems<\/strong>\u201c:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-68689\" src=\"https:\/\/i1.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/06\/installing.png?resize=786%2C443&amp;ssl=1\" sizes=\"auto, (max-width: 786px) 100vw, 786px\" srcset=\"https:\/\/i1.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/06\/installing.png?w=786&amp;ssl=1 786w, https:\/\/i1.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/06\/installing.png?resize=300%2C169&amp;ssl=1 300w, https:\/\/i1.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/06\/installing.png?resize=768%2C433&amp;ssl=1 768w\" alt=\"\" width=\"750\" height=\"423\" \/><\/p>\n<p>5) That\u2019s it. It should be installed after a few seconds.<\/p>\n<h2>2. Deleting the espressif folder<\/h2>\n<p><strong>If this is your first time installing the ESP32 on Arduino IDE you can ignore this section.<\/strong><\/p>\n<p>If you\u2019ve followed the older installation procedure and you\u2019ve manually installed the ESP32 add-on with Git GUI, you need to remove the <strong>espressif<\/strong> folder from your Arduino IDE.<\/p>\n<p>To find your <strong>espressif<\/strong> folder and Arduino IDE location (installation path), open your Arduino IDE and go to <strong>File<\/strong> &gt; <strong>Preferences<\/strong>:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-65444 aligncenter\" src=\"https:\/\/i1.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2016\/12\/find-arduino-ide-path.png?resize=722%2C607&amp;ssl=1\" sizes=\"auto, (max-width: 722px) 100vw, 722px\" srcset=\"https:\/\/i1.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2016\/12\/find-arduino-ide-path.png?w=722&amp;ssl=1 722w, https:\/\/i1.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2016\/12\/find-arduino-ide-path.png?resize=300%2C252&amp;ssl=1 300w\" alt=\"\" width=\"722\" height=\"607\" \/><\/p>\n<p>Copy the location from the \u201c<strong>Sketchbook location<\/strong>\u201d field:<\/p>\n<p>Go to your Arduino IDE location directory: <em>C:\\Users\\ruisantos\\Documents\\Arduino<\/em> and open the <strong>hardware<\/strong> folder:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-68690\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/06\/open-hardware-folder2.png?resize=620%2C323&amp;ssl=1\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/06\/open-hardware-folder2.png?w=620&amp;ssl=1 620w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/06\/open-hardware-folder2.png?resize=300%2C156&amp;ssl=1 300w\" alt=\"\" width=\"620\" height=\"323\" \/><\/p>\n<p>Then, delete the <strong>espressif<\/strong> folder:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-68687\" src=\"https:\/\/i2.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/06\/delete-espressif-folder.png?resize=616%2C324&amp;ssl=1\" sizes=\"auto, (max-width: 616px) 100vw, 616px\" srcset=\"https:\/\/i2.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/06\/delete-espressif-folder.png?w=616&amp;ssl=1 616w, https:\/\/i2.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/06\/delete-espressif-folder.png?resize=300%2C158&amp;ssl=1 300w\" alt=\"\" width=\"616\" height=\"324\" \/><\/p>\n<h2>Testing the Installation<\/h2>\n<p>Plug the ESP32 board\u00a0to your computer. Then, follow these steps:<\/p>\n<p>1) Open the Arduino IDE<\/p>\n<p>2) Select your Board in\u00a0<strong>Tools<\/strong>\u00a0&gt;\u00a0<strong>Board<\/strong>\u00a0menu (in my case it\u2019s the\u00a0<strong>DOIT ESP32 DEVKIT V1<\/strong>)<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-65451\" src=\"https:\/\/i1.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2016\/12\/windows-select-board.png?resize=614%2C520&amp;ssl=1\" sizes=\"auto, (max-width: 614px) 100vw, 614px\" srcset=\"https:\/\/i1.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2016\/12\/windows-select-board.png?w=614&amp;ssl=1 614w, https:\/\/i1.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2016\/12\/windows-select-board.png?resize=300%2C254&amp;ssl=1 300w\" alt=\"\" width=\"614\" height=\"520\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>3) Select the Port (if you don\u2019t see the COM Port in your Arduino IDE, you need to install the\u00a0<a href=\"https:\/\/www.silabs.com\/products\/development-tools\/software\/usb-to-uart-bridge-vcp-drivers\" target=\"_blank\" rel=\"noopener noreferrer\">ESP32 CP210x USB to UART Bridge VCP Drivers<\/a>):<\/p>\n<p>4) Open the following example under <strong>File<\/strong> &gt; <strong>Examples<\/strong> &gt; <strong>WiFi (ESP32)<\/strong> &gt; <strong>WiFi Scan<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-65450\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2016\/12\/windows-open-wifi-scan-example.png?resize=586%2C686&amp;ssl=1\" sizes=\"auto, (max-width: 586px) 100vw, 586px\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2016\/12\/windows-open-wifi-scan-example.png?w=586&amp;ssl=1 586w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2016\/12\/windows-open-wifi-scan-example.png?resize=256%2C300&amp;ssl=1 256w\" alt=\"\" width=\"586\" height=\"686\" \/><\/p>\n<p>5) A new sketch opens:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-65453\" src=\"https:\/\/i1.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2016\/12\/windows-wifi-scan-example-open.png?resize=827%2C719&amp;ssl=1\" sizes=\"auto, (max-width: 827px) 100vw, 827px\" srcset=\"https:\/\/i1.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2016\/12\/windows-wifi-scan-example-open.png?w=827&amp;ssl=1 827w, https:\/\/i1.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2016\/12\/windows-wifi-scan-example-open.png?resize=300%2C261&amp;ssl=1 300w, https:\/\/i1.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2016\/12\/windows-wifi-scan-example-open.png?resize=768%2C668&amp;ssl=1 768w\" alt=\"\" width=\"750\" height=\"652\" \/><\/p>\n<p>6) Press the\u00a0<strong>Upload<\/strong>\u00a0button in the Arduino IDE. Wait a few seconds while the code compiles and uploads to your board.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-65439\" src=\"https:\/\/i2.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2016\/12\/arduino-ide-upload-button.png?resize=34%2C29&amp;ssl=1\" alt=\"\" width=\"34\" height=\"29\" \/><\/p>\n<p>7) If everything went as expected, you should see a \u201c<strong>Done uploading.<\/strong>\u201d message.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-65448\" src=\"https:\/\/i2.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2016\/12\/windows-arduino-ide-done-uploading.png?resize=671%2C388&amp;ssl=1\" sizes=\"auto, (max-width: 671px) 100vw, 671px\" srcset=\"https:\/\/i2.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2016\/12\/windows-arduino-ide-done-uploading.png?w=671&amp;ssl=1 671w, https:\/\/i2.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2016\/12\/windows-arduino-ide-done-uploading.png?resize=300%2C173&amp;ssl=1 300w\" alt=\"\" width=\"671\" height=\"388\" \/><\/p>\n<p>8) Open the Arduino IDE Serial Monitor at a baud rate of 115200:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-65447\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2016\/12\/mac-open-arduino-ide-serial-monitor.png?resize=38%2C29&amp;ssl=1\" alt=\"\" width=\"38\" height=\"29\" \/><\/p>\n<p>9) Press the ESP32 on-board\u00a0<strong>Enable<\/strong>\u00a0button and you should see the networks available near your ESP32:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-65449\" src=\"https:\/\/i2.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2016\/12\/windows-arduino-ide-serial-monitor.png?resize=646%2C425&amp;ssl=1\" sizes=\"auto, (max-width: 646px) 100vw, 646px\" srcset=\"https:\/\/i2.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2016\/12\/windows-arduino-ide-serial-monitor.png?w=646&amp;ssl=1 646w, https:\/\/i2.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2016\/12\/windows-arduino-ide-serial-monitor.png?resize=300%2C197&amp;ssl=1 300w\" alt=\"\" width=\"646\" height=\"425\" \/><\/p>\n<h2>Wrapping Up<\/h2>\n<p>This is a very basic tutorial that illustrates how to prepare your Arduino IDE for the ESP32 on a Windows PC. To install the Arduino IDE on Mac OS or Linux, follow <a href=\"https:\/\/randomnerdtutorials.com\/installing-the-esp32-board-in-arduino-ide-mac-and-linux-instructions\/\">these instructions<\/a> instead.\u00a0If you encounter any issues during the installation procedure, take a look at the <a href=\"https:\/\/randomnerdtutorials.com\/esp32-troubleshooting-guide\/\">ESP32 troubleshooting guide<\/a>.<\/p>\n<p>You might also like reading:<\/p>\n<ul>\n<li><a href=\"https:\/\/randomnerdtutorials.com\/learn-esp32-with-arduino-ide\/\">Learn ESP32 with Arduino IDE Course<\/a><\/li>\n<li><a href=\"https:\/\/randomnerdtutorials.com\/esp32-dc-motor-l298n-motor-driver-control-speed-direction\/\">ESP32 with DC Motor and L298N Motor Driver \u2013 Control Speed and Direction<\/a><\/li>\n<li><a href=\"https:\/\/randomnerdtutorials.com\/esp32-bluetooth-low-energy-ble-arduino-ide\/\">Getting Started with ESP32 Bluetooth Low Energy (BLE) on Arduino IDE<\/a><\/li>\n<\/ul>\n<p>Thanks for reading.<\/p>\n<p>\u6587\u7ae0\u8f6c\u81ea\uff1ahttps:\/\/randomnerdtutorials.com\/installing-the-esp32-board-in-arduino-ide-windows-instructions\/<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The\u00a0ESP32\u00a0is currently being\u00a0integrated\u00a0with the\u00a0Arduin<\/p>\n<div class=\"more-link\">\n\t\t\t\t <a href=\"http:\/\/www.inhhh.com\/blog\/?p=280\" class=\"link-btn theme-btn\"><span>Read More <\/span> <i class=\"fa fa-caret-right\"><\/i><\/a>\n\t\t\t<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-280","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/www.inhhh.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/280","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.inhhh.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.inhhh.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.inhhh.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.inhhh.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=280"}],"version-history":[{"count":2,"href":"http:\/\/www.inhhh.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/280\/revisions"}],"predecessor-version":[{"id":282,"href":"http:\/\/www.inhhh.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/280\/revisions\/282"}],"wp:attachment":[{"href":"http:\/\/www.inhhh.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=280"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.inhhh.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=280"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.inhhh.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=280"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}