{"id":1528,"date":"2019-04-26T23:56:46","date_gmt":"2019-04-26T15:56:46","guid":{"rendered":"https:\/\/www.techcoil.com\/blog\/?p=1528"},"modified":"2020-05-12T10:42:50","modified_gmt":"2020-05-12T02:42:50","slug":"enabling-esp32-development-on-arduino-ide","status":"publish","type":"post","link":"https:\/\/www.techcoil.com\/blog\/enabling-esp32-development-on-arduino-ide\/","title":{"rendered":"Enabling ESP32 Development on Arduino IDE"},"content":{"rendered":"<p>When you want to implement a low cost <a href=\"https:\/\/www.techcoil.com\/glossary\/internet-of-thing\" rel=\"noopener\" target=\"_blank\">IOT<\/a> solution with bluetooth interface, you can consider using a <a href=\"https:\/\/www.amazon.com\/HiLetgo-ESP-WROOM-32-Development-Microcontroller-Integrated\/dp\/B0718T232Z\/ref=as_li_ss_tl?ie=UTF8&linkCode=ll1&tag=clivsperswebs-20&linkId=c7ac4cad019d6908676708de7fa9f6f2&language=en_US\" rel=\"noopener\" target=\"_blank\">ESP32 development board<\/a>. In addition to the bluetooth interface, the ESP32 development board also includes a WiFi interface.<\/p>\n<p>In order to run a program on the ESP32 Development Board, we will need to write our program into the flash memory of the development board. Since it is easy to write code and flash programs with <a href=\"https:\/\/www.arduino.cc\/en\/Main\/Software\" rel=\"noopener\" target=\"_blank\">Arduino IDE<\/a>, it is a good tool to use with the ESP32 Development Board.<\/p>\n<p>In case you need it, this post shows how to enable ESP32 development on Arduino IDE.<\/p>\n<h2>Getting a copy of Arduino IDE that supports addons with the Arduino Boards Manager<\/h2>\n<p>Firstly, ensure that your copy of Arduino IDE supports addons with the Arduino Boards Manager. When you have an Arduino IDE 1.6.4 and later, you will be ready to add the ESP32 core to your Arduino IDE. If you do not have one, <a href=\"https:\/\/www.arduino.cc\/en\/Main\/Software#download\" rel=\"noopener\" target=\"_blank\">download the latest Arduino IDE<\/a> and install it on your computer.<\/p>\n<h2>Installing ESP32 core with Arduino Boards Manager<\/h2>\n<p>In order to enable ESP32 development on Arduino IDE, we will need to add the <a href=\"https:\/\/github.com\/espressif\/arduino-esp32\" rel=\"noopener\" target=\"_blank\">ESP32 core<\/a>.<\/p>\n<p>When your Arduino IDE had started, go to <strong>Arduino -> Preferences<\/strong> to open up the Preferences windows.<\/p>\n<p>Next, enter<strong> https:\/\/dl.espressif.com\/dl\/package_esp32_index.json<\/strong> into the Additional Board Manager URLs textfield.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/Mac-Arduino-IDE-1.8.9-Preferences-window-with-ESP32-core-url-inside-additional-board-managers-urls.gif\" alt=\"Mac-Arduino-IDE-1.8.9-Preferences-window-with-ESP32-core-url-inside-additional-board-managers-urls\" \/><\/p>\n<p>After that, press <strong>OK<\/strong> on the <strong>Additional Boards Manager URLs<\/strong> windows and <strong>OK<\/strong> on the <strong>Preferences<\/strong> windows to exit <strong>Preferences<\/strong>.<\/p>\n<p>Once you had included the ESP32 core URL, go to <strong>Tools -> Boards -> Boards Manager...<\/strong> to open up the <strong>Boards Manager<\/strong> window. When the <strong>Boards Manager<\/strong> window appears, find <strong>ESP 32<\/strong> and click <strong>Install<\/strong>:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/Mac-Arduino-IDE-1.8.9-Boards-Manager-window-with-ESP-32-core-listed.gif\" alt=\"Mac-Arduino-IDE-1.8.9-Boards-Manager-window-with-ESP-32-core-listed\" \/><\/p>\n<p>After you clicked install, a progress bar appears to show the installation process:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/Mac-Arduino-IDE-1.8.9-Boards-Manager-window-with-ESP-32-core-being-installed.gif\" alt=\"Mac-Arduino-IDE-1.8.9-Boards-Manager-window-with-ESP-32-core-being-installed\"\/><\/p>\n<p>When the installation is completed, the Boards Manager will show the version of ESP 32 that had been installed on your Arduino IDE:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/Mac-Arduino-IDE-1.8.9-Boards-Manager-window-with-ESP-32-core-1.0.2-installed.gif\" alt=\"Mac-Arduino-IDE-1.8.9-Boards-Manager-window-with-ESP-32-core-1.0.2-installed\"\/><\/p>\n<h2>Installing a CP210x USB to UART Bridge VCP Driver<\/h2>\n<p>In order to flash your program to your ESP32 Development Board, you will also need to have CP210x USB to UART Bridge VCP Driver installed on your computer. Therefore, <a href=\"https:\/\/www.silabs.com\/products\/development-tools\/software\/usb-to-uart-bridge-vcp-drivers\" rel=\"noopener\" target=\"_blank\">go to Silicon's download page for CP210x USB to UART Bridge VCP Drivers<\/a> to get a copy for your computer. Follow the instructions to install the respective driver for your computer.<\/p>\n<h2>Verifying that you can flash a program to your ESP32 board with Arduino IDE<\/h2>\n<p>Once you had installed the CP210x USB to UART Bridge VCP Driver on your computer, you can proceed to verify that you can flash a program to your ESP32 board with your Arduino IDE.<\/p>\n<h2>Connecting your ESP32 Development Board to your computer<\/h2>\n<p>First, connect your ESP32 Development Board to your computer via a <a href=\"https:\/\/www.amazon.com\/Anker-Powerline-Premium-Motorola-Smartphones\/dp\/B019PZPYK6\/ref=as_li_ss_tl?ie=UTF8&linkCode=ll1&tag=clivsperswebs-20&linkId=9ad7fec2f9065ca27ca1b94472c7232c&language=en_US\" rel=\"noopener\" target=\"_blank\">good microUSB cable<\/a>.<\/p>\n<p>Once you had done so, copy and paste the following codes into the editor of your Arduino IDE:<\/p>\n<pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\r\nvoid setup() {\r\n  Serial.begin(9600);\r\n  delay(1000);\r\n  Serial.println(&quot;Hello there, I am running ok.&quot;);\r\n}\r\n\r\nvoid loop() {\r\n  Serial.println(&quot;I am repeating myself every second.&quot;);\r\n  delay(1000);\r\n}\r\n<\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/Mac-Arduino-IDE-1.8.9-helloworld-sketch-20190426.gif\" alt=\"Mac-Arduino-IDE-1.8.9-helloworld-sketch-20190426\"  \/><\/p>\n<p>After you had done so, click the serial monitor button on the top right of your Arduino IDE:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/Mac-Arduino-IDE-1.8.9-helloworld-sketch-20190426-with-serial-monitor-button-highlighted.gif\" alt=\"Mac-Arduino-IDE-1.8.9-helloworld-sketch-20190426-with-serial-monitor-button-highlighted\" \/><\/p>\n<p>Once you had done so, you should see a window like this:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/Mac-Arduino-IDE-1.8.9-serial-monitor-connected-to-slab-usbtouart.gif\" alt=\"Mac-Arduino-IDE-1.8.9-serial-monitor-connected-to-slab-usbtouart\" \/><\/p>\n<p>When your program runs on your board, the serial output of your program will appear here.<\/p>\n<p>Next, click on your editor window and select <strong>ESP32 Dev Module<\/strong> as the development board:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/Mac-Arduino-IDE-1.8.9-selecting-ESP32-Dev-Module-as-the-board-to-flash-program-to.gif\" alt=\"Mac-Arduino-IDE-1.8.9-selecting-ESP32-Dev-Module-as-the-board-to-flash-program-to\" \/><\/p>\n<p>After you had selected the board, select the port on your computer that you will use to flash your program to your board: <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/Mac-Arduino-IDE-1.8.9-selecting-slab_USBtoUART-as-the-port-to-flash-program-to.gif\" alt=\"Mac-Arduino-IDE-1.8.9-selecting-slab_USBtoUART-as-the-port-to-flash-program-to\" \/><\/p>\n<p>At this point in time, you are ready to flash your program onto your board. In order to do so, click on  the upload button on the editor:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/Mac-Arduino-IDE-1.8.9-helloworld-sketch-20190426-with-upload-button-highlighted.gif\" alt=\"Mac-Arduino-IDE-1.8.9-helloworld-sketch-20190426-with-upload-button-highlighted\"\/><\/p>\n<p>When you do that, Arduino IDE will prompt you to save the sketch. After you had saved the sketch, the Arduino IDE will flash your program onto the board.<\/p>\n<p>When Arduino IDE had flashed your program onto the board, the serial monitor window should display similar output as the following:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/Mac-Arduino-IDE-1.8.9-helloworld-sketch-output-in-serial-monitor-20190426.gif\" alt=\"Mac-Arduino-IDE-1.8.9-helloworld-sketch-output-in-serial-monitor-20190426\" \/><\/p>\n<p><img decoding=\"async\" width=\"600\" height=\"900\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/Enabling-ESP32-Development-on-Arduino-IDE.jpg\" alt=\"Enabling ESP32 Development on Arduino IDE\" class=\"aligncenter size-full wp-image-1940\" \/><\/p>\n\n      <ul id=\"social-sharing-buttons-list\">\n        <li class=\"facebook\">\n          <a href=\"https:\/\/www.facebook.com\/sharer\/sharer.php?u=https%3A%2F%2Fwp.me%2Fp245TQ-oE\" target=\"_blank\" role=\"button\" rel=\"nofollow\">\n            <img decoding=\"async\" src=\"\/ph\/img\/3rd-party\/social-icons\/Facebook.png\" alt=\"Facebook icon\"> Share\n          <\/a>\n        <\/li>\n        <li class=\"twitter\">\n          <a href=\"https:\/\/twitter.com\/intent\/tweet?text=&url=https%3A%2F%2Fwp.me%2Fp245TQ-oE&via=Techcoil_com\" target=\"_blank\" role=\"button\" rel=\"nofollow\">\n          <img decoding=\"async\" src=\"\/ph\/img\/3rd-party\/social-icons\/Twitter.png\" alt=\"Twitter icon\"> Tweet\n          <\/a>\n        <\/li>\n        <li class=\"linkedin\">\n          <a href=\"https:\/\/www.linkedin.com\/shareArticle?mini=1&title=&url=https%3A%2F%2Fwp.me%2Fp245TQ-oE&source=https:\/\/www.techcoil.com\" target=\"_blank\" role=\"button\" rel=\"nofollow\">\n          <img decoding=\"async\" src=\"\/ph\/img\/3rd-party\/social-icons\/linkedin.png\" alt=\"Linkedin icon\"> Share\n          <\/a>\n        <\/li>\n        <li class=\"pinterest\">\n          <a href=\"https:\/\/pinterest.com\/pin\/create\/button\/?url=https%3A%2F%2Fwww.techcoil.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F1528&description=\" class=\"pin-it-button\" target=\"_blank\" role=\"button\" rel=\"nofollow\" count-layout=\"horizontal\">\n          <img decoding=\"async\" src=\"\/ph\/img\/3rd-party\/social-icons\/Pinterest.png\" alt=\"Pinterest icon\"> Save\n          <\/a>\n        <\/li>\n      <\/ul>\n    ","protected":false},"excerpt":{"rendered":"<p>When you want to implement a low cost <a href=\"https:\/\/www.techcoil.com\/glossary\/internet-of-thing\" rel=\"noopener\" target=\"_blank\">IOT<\/a> solution with bluetooth interface, you can consider using a <a href=\"https:\/\/www.amazon.com\/HiLetgo-ESP-WROOM-32-Development-Microcontroller-Integrated\/dp\/B0718T232Z\/ref=as_li_ss_tl?ie=UTF8&#038;linkCode=ll1&#038;tag=clivsperswebs-20&#038;linkId=c7ac4cad019d6908676708de7fa9f6f2&#038;language=en_US\" rel=\"noopener\" target=\"_blank\">ESP32 development board<\/a>. In addition to the bluetooth interface, the ESP32 development board also includes a WiFi interface.<\/p>\n<p>In order to run a program on the ESP32 Development Board, we will need to write our program into the flash memory of the development board. Since it is easy to write code and flash programs with <a href=\"https:\/\/www.arduino.cc\/en\/Main\/Software\" rel=\"noopener\" target=\"_blank\">Arduino IDE<\/a>, it is a good tool to use with the ESP32 Development Board.<\/p>\n<p>In case you need it, this post shows how to enable ESP32 development on Arduino IDE.<\/p>\n","protected":false},"author":1,"featured_media":1534,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"footnotes":""},"categories":[4],"tags":[588,630,632,633],"jetpack_featured_media_url":"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/Mac-Arduino-IDE-1.8.9-Boards-Manager-window-with-ESP-32-core-1.0.2-installed.gif","jetpack_shortlink":"https:\/\/wp.me\/p245TQ-oE","jetpack-related-posts":[],"jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/posts\/1528"}],"collection":[{"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/comments?post=1528"}],"version-history":[{"count":0,"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/posts\/1528\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/media\/1534"}],"wp:attachment":[{"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/media?parent=1528"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/categories?post=1528"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/tags?post=1528"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}