Programming the ESP8266 with the Arduino IDE

Originalartikel

Backup

<html> <section id=„things“><div class=„project-section-title“> <h2 class=„hckuitypographyh2 title-with-anchor“>Things used in this project</h2> </div> <div class=„project-parts view-expanded c7“> <table class=„project-parts-table“><tbody><tr class=„head“><td colspan=„6“> <h3 class=„hckuitypographyh3“>Hardware components</h3> </td> </tr><tr><td class=„part-img“><img srcset=„https://hackster.imgix.net/uploads/image/file/51067/esp01.jpg?auto=compress%2Cformat&amp;w=96&amp;h=96&amp;fit=fill&amp;bg=ffffff 2x, https://hackster.imgix.net/uploads/image/file/51067/esp01.jpg?auto=compress%2Cformat&amp;w=48&amp;h=48&amp;fit=fill&amp;bg=ffffff“ alt=„ESP8266 ESP-01“ src=„https://hackster.imgix.net/uploads/image/file/51067/esp01.jpg?auto=compress%2Cformat&amp;w=48&amp;h=48&amp;fit=fill&amp;bg=ffffff“/></td> <td> <table><tbody><tr><td class=„hckuitypographybodyL“><a data-ha=„{&quot;eventName&quot;:&quot;Clicked link&quot;,&quot;customProps&quot;:{&quot;value&quot;:&quot;Everything ESP ESP8266 ESP-01&quot;,&quot;href&quot;:&quot;/esp/products/esp8266-esp-01&quot;,&quot;type&quot;:&quot;part&quot;,&quot;location&quot;:&quot;things&quot;},&quot;clickOpts&quot;:{&quot;delayRedirect&quot;:true}}“ class=„hckuitypographylinkBlue“ href=„https://www.hackster.io/esp/products/esp8266-esp-01“>Everything ESP ESP8266 ESP-01</a></td> </tr><tr><td class=„hckuitypographybodyS hckuitypographypebble hckuitypographybreakWord“/> </tr></tbody></table></td> <td class=„hckuitypographybodyL times“>&#215;</td> <td class=„hckuitypographybodyL quantity“>1</td> <td class=„actions“> </td> </tr><tr><td class=„part-img“><img srcset=„https://hackster.imgix.net/uploads/image/file/160542/A000066_iso_both.jpg?auto=compress%2Cformat&amp;w=96&amp;h=96&amp;fit=fill&amp;bg=ffffff 2x, https://hackster.imgix.net/uploads/image/file/160542/A000066_iso_both.jpg?auto=compress%2Cformat&amp;w=48&amp;h=48&amp;fit=fill&amp;bg=ffffff“ alt=„Arduino UNO &amp; Genuino UNO“ src=„https://hackster.imgix.net/uploads/image/file/160542/A000066_iso_both.jpg?auto=compress%2Cformat&amp;w=48&amp;h=48&amp;fit=fill&amp;bg=ffffff“/></td> <td> <table><tbody><tr><td class=„hckuitypographybodyL“><a data-ha=„{&quot;eventName&quot;:&quot;Clicked link&quot;,&quot;customProps&quot;:{&quot;value&quot;:&quot;Arduino UNO \u0026 Genuino UNO&quot;,&quot;href&quot;:&quot;/arduino/products/arduino-uno-genuino-uno&quot;,&quot;type&quot;:&quot;part&quot;,&quot;location&quot;:&quot;things&quot;},&quot;clickOpts&quot;:{&quot;delayRedirect&quot;:true}}“ class=„hckuitypographylinkBlue“ href=„https://www.hackster.io/arduino/products/arduino-uno-genuino-uno“>Arduino UNO &amp; Genuino UNO</a></td> </tr><tr><td class=„hckuitypographybodyS hckuitypographypebble hckuitypographybreakWord“>You could also use a UARTbee or any UART to USB device</td> </tr></tbody></table></td> <td class=„hckuitypographybodyL times“>&#215;</td> <td class=„hckuitypographybodyL quantity“>1</td> <td class=„actions“> </td> </tr><tr><td class=„part-img“><img srcset=„https://hackster.imgix.net/uploads/image/file/44496/11026-02.jpg?auto=compress%2Cformat&amp;w=96&amp;h=96&amp;fit=fill&amp;bg=ffffff 2x, https://hackster.imgix.net/uploads/image/file/44496/11026-02.jpg?auto=compress%2Cformat&amp;w=48&amp;h=48&amp;fit=fill&amp;bg=ffffff“ alt=„Jumper wires (generic)“ src=„https://hackster.imgix.net/uploads/image/file/44496/11026-02.jpg?auto=compress%2Cformat&amp;w=48&amp;h=48&amp;fit=fill&amp;bg=ffffff“/></td> <td> <table><tbody><tr><td class=„hckuitypographybodyL“>Jumper wires (generic)</td> </tr><tr><td class=„hckuitypographybodyS hckuitypographypebble hckuitypographybreakWord“/> </tr></tbody></table></td> <td class=„hckuitypographybodyL times“>&#215;</td> <td class=„hckuitypographybodyL quantity“>1</td> <td class=„actions“> </td> </tr><tr class=„head“><td colspan=„6“> <h3 class=„hckuitypographyh3“>Software apps and online services</h3> </td> </tr><tr><td class=„part-img“><img srcset=„https://hackster.imgix.net/uploads/image/file/144203/IDE_web.jpg?auto=compress%2Cformat&amp;w=96&amp;h=96&amp;fit=fill&amp;bg=ffffff 2x, https://hackster.imgix.net/uploads/image/file/144203/IDE_web.jpg?auto=compress%2Cformat&amp;w=48&amp;h=48&amp;fit=fill&amp;bg=ffffff“ alt=„Arduino IDE“ src=„https://hackster.imgix.net/uploads/image/file/144203/IDE_web.jpg?auto=compress%2Cformat&amp;w=48&amp;h=48&amp;fit=fill&amp;bg=ffffff“/></td> <td> <table><tbody><tr><td class=„hckuitypographybodyL“><a data-ha=„{&quot;eventName&quot;:&quot;Clicked link&quot;,&quot;customProps&quot;:{&quot;value&quot;:&quot;Arduino IDE&quot;,&quot;href&quot;:&quot;/arduino/products/arduino-ide&quot;,&quot;type&quot;:&quot;part&quot;,&quot;location&quot;:&quot;things&quot;},&quot;clickOpts&quot;:{&quot;delayRedirect&quot;:true}}“ class=„hckuitypographylinkBlue“ href=„https://www.hackster.io/arduino/products/arduino-ide“>Arduino IDE</a></td> </tr><tr><td class=„hckuitypographybodyS hckuitypographypebble hckuitypographybreakWord“>version 1.6.6 or higher</td> </tr></tbody></table></td> <td colspan=„2“/> <td class=„actions“><a target=„_blank“ rel=„nofollow noopener“ class=„hckuibuttonsmd hckuibuttonsicon hckuibuttonsoutlineBlack“ title=„More info“ href=„https://www.arduino.cc/en/main/software“><em class=„hckuitypographyiconWrapper“><svg class=„hckuitypographyicon hckuitypographyicon16“><use xlink:href=„#svg-external-link“/></svg></em></a></td> </tr></tbody></table></div> </section> <section id=„story“> <div class=„project-story collapsible-section collapsed hljs-active hljs-monokai“ itemprop=„text“> <p class=„hckuitypographybodyL“>The ESP8266 is a low-cost WiFi module&#160;built by&#160;Espressif Systems. Its&#160;popularity has been growing among the hardware community thanks to it's nice features and stability. It can even be easily programmed using your Arduino IDE.</p> <p class=„hckuitypographybodyL“>In this post, we'll learn how to program your ESP8266 using an UARTbee or Arduino UNO, and the Arduino IDE.</p> <h3 class=„hckuitypographyh3 title-with-anchor“ id=„toc-wire-up-0“>Wire up!</h3> <p class=„hckuitypographybodyL“>First we'll need to identify the pinout of ESP8266.&#160;</p> <div class=„image_carouselcontainerhMJxn image_carouselwrapper102VA image_carouselscrollContainer3mmPE image_carouselimageContainer22WPm image_carouselimageWrapper39AG2“ data-hypernova-key=„ImageCarousel“ data-hypernova-id=„35c15af2-c488-4da9-915c-1709592da0b8“><img class=„image_carouselimage2-CjO“ alt=„“ srcset=„“ src=„https://hackster.imgix.net/uploads/image/file/164337/ubidots-esp-pins.png?auto=compress%2Cformat&amp;w=740&amp;h=555&amp;fit=max“/></div> <p class=„hckuitypographybodyL“>To set the ESP8266 in programming mode you need to connect&#160;its wires like this:</p> <p class=„hckuitypographybodyL“><strong>ESP8266 UARTbee Arduino UNO</strong></p> <ul class=„hckuitypographybodyL“><li>RXD TXD</li> </ul><ul class=„hckuitypographybodyL“><li>RX GPIO0</li> </ul><ul class=„hckuitypographybodyL“><li>GND GND</li> </ul><ul class=„hckuitypographybodyL“><li>GPIO2 ——-</li> </ul><ul class=„hckuitypographybodyL“><li>———- GND</li> </ul><ul class=„hckuitypographybodyL“><li>GND GND</li> </ul><ul class=„hckuitypographybodyL“><li>VCC 3.3V</li> </ul><ul class=„hckuitypographybodyL“><li>3.3V RST</li> </ul><ul class=„hckuitypographybodyL“><li>——– ———–</li> </ul><ul class=„hckuitypographybodyL“><li>CH_PD 3.3V</li> </ul><ul class=„hckuitypographybodyL“><li>3.3V TXD</li> </ul><ul class=„hckuitypographybodyL“><li>RXD TX</li> </ul><p class=„hckuitypographybodyL“><em><strong>Note</strong></em>: If you are using an Arduino UNO you will need to set Arduino RST to GND. Please be careful with the VCC of the ESP8266, it works only with a 3.3V supply.</p> <h3 class=„hckuitypographyh3 title-with-anchor“ id=„toc-setup-the-arduino-ide-1“>Setup the Arduino IDE</h3> <ul class=„hckuitypographybodyL“><li>Open you IDE and click on <strong>„File -&gt; Preferences“.</strong></li> </ul><ul class=„hckuitypographybodyL“><li>In &#160;„Aditional Boards Manager URLs“ add this line and click on „OK“: <em><a href=„http://arduino.esp8266.com/stable/package_esp8266com_index.json%22“ class=„hckuitypographylinkBlue“ data-ha=„{&quot;eventName&quot;:&quot;Clicked link&quot;,&quot;customProps&quot;:{&quot;value&quot;:&quot;http://arduino.esp8266.com/stable/package_esp8266com_index.json&quot;,&quot;href&quot;:&quot;http://arduino.esp8266.com/stable/package_esp8266com_index.json%22&quot;,&quot;type&quot;:&quot;story&quot;,&quot;location&quot;:&quot;story&quot;},&quot;clickOpts&quot;:{&quot;delayRedirect&quot;:true}}“ rel=„nofollow“>http://arduino.esp8266.com/stable/package_esp8266com_index.json</a></em></li> </ul><ul class=„hckuitypographybodyL“><li>Go to <strong>„Tools -&gt; Board -&gt; Boards Manager“</strong>,&#160;type „ESP8266“ and install it.</li> </ul><ul class=„hckuitypographybodyL“><li>Go again to <strong>„Tools -&gt; Board“</strong> and select „Generic ESP8266 Module“.</li> </ul><h3 class=„hckuitypographyh3 title-with-anchor“ id=„toc-flash-your-code-2“>Flash your code!</h3> <p class=„hckuitypographybodyL“>Now &#160;you're ready to&#160;use your ESP8266 as a stand-alone module&#160;without needing an&#160;external micro-controller. Check out more&#160;ESP8266 resources&#160;<a href=„http://ubidots.com/docs/devices/nodeMCU.html#send-one-value-to-ubidots“ class=„hckuitypographylinkBlue“ data-ha=„{&quot;eventName&quot;:&quot;Clicked link&quot;,&quot;customProps&quot;:{&quot;value&quot;:&quot;here&quot;,&quot;href&quot;:&quot;http://ubidots.com/docs/devices/nodeMCU.html#send-one-value-to-ubidots&quot;,&quot;type&quot;:&quot;story&quot;,&quot;location&quot;:&quot;story&quot;},&quot;clickOpts&quot;:{&quot;delayRedirect&quot;:true}}“ rel=„nofollow“>here</a>&#160;to learn how to build IoT products and projects using this amazing module.&#160;</p> </div> <a class=„toggle-container hckuitypographytextCenter hckuilayouthiddenMedUp hckuitypographylink hckuitypographybodyS hckuitypographybold“ href=„javascript:void(0)“ onclick=„javascript:toggleContainer(&quot;.project-story&quot;, this);“>Read more</a></section> <section id=„team“><div class=„project-section-title“> <h2 class=„hckuitypographyh2 title-with-anchor“>Credits</h2> </div> </section> <section id=„comments“><div class=„project-section-title“> <h2 class=„hckuitypographyh2 title-with-anchor“>Comments</h2> </div> </section> </html>