{"id":253,"date":"2016-07-05T20:30:53","date_gmt":"2016-07-06T04:30:53","guid":{"rendered":"http:\/\/www.nathanbak.com\/?p=253"},"modified":"2026-01-02T20:04:41","modified_gmt":"2026-01-03T04:04:41","slug":"my-new-toy","status":"publish","type":"post","link":"https:\/\/nathanbak.com\/?p=253","title":{"rendered":"My New Toy (Part 1)"},"content":{"rendered":"<p>Today my new toy arrived.\u00a0 It&#8217;s an ESP8266 IOT WiFi Module.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-252\" src=\"http:\/\/www.nathanbak.com\/wp-content\/uploads\/2016\/07\/2016-07-05-19.50.42-e1467773814445-300x153.jpg\" alt=\"ESP8622\" width=\"300\" height=\"153\" srcset=\"https:\/\/nathanbak.com\/wp-content\/uploads\/2016\/07\/2016-07-05-19.50.42-e1467773814445-300x153.jpg 300w, https:\/\/nathanbak.com\/wp-content\/uploads\/2016\/07\/2016-07-05-19.50.42-e1467773814445-768x391.jpg 768w, https:\/\/nathanbak.com\/wp-content\/uploads\/2016\/07\/2016-07-05-19.50.42-e1467773814445-1024x522.jpg 1024w, https:\/\/nathanbak.com\/wp-content\/uploads\/2016\/07\/2016-07-05-19.50.42-e1467773814445-1200x611.jpg 1200w, https:\/\/nathanbak.com\/wp-content\/uploads\/2016\/07\/2016-07-05-19.50.42-e1467773814445.jpg 1670w\" sizes=\"auto, (max-width: 300px) 85vw, 300px\" \/><\/p>\n<p>Specifically I selected the &#8220;Elecrow ESP8266 IOT Board WiFi Module with Built in USB and Battery Charging&#8221; out of the many ESP8266 variants because of the following features:<\/p>\n<ul>\n<li>Onboard USB (I find it easier than FTDI)<\/li>\n<li>NOT breadboard friendly (Pins sticking up not down)<\/li>\n<li>In stock and eligible for Prime shipping<\/li>\n<\/ul>\n<p>To start with, I just wanted to verify that I could run some code on it.\u00a0 Here&#8217;s what I did:<\/p>\n<ol>\n<li>Installed the Arduino IDE from <a href=\"https:\/\/www.arduino.cc\/en\/Main\/Software\">https:\/\/www.arduino.cc\/en\/Main\/Software<\/a>.\u00a0 I used the latest available (1.6.9).<\/li>\n<li>Configured the Arduino IDE to support ESP8266 boards:\n<ol>\n<li>Opened up the preferences and added <a href=\"http:\/\/arduino.esp8266.com\/versions\/2.3.0\/package_esp8266com_index.json\">http:\/\/arduino.esp8266.com\/versions\/2.3.0\/package_esp8266com_index.json<\/a> to the &#8220;Additional Boards Manager URLs&#8221;.<\/li>\n<li>Opened the &#8220;Boards Manager&#8221;, found the &#8220;esp8266&#8221; listing, and clicked the &#8220;Install&#8221; button (using the latest 2.3.0 version).<\/li>\n<li>Since there wasn&#8217;t a specific Electrow entry, I selected &#8220;Generic ESP8266 Module&#8221; for the board type.<\/li>\n<\/ol>\n<\/li>\n<li>Wrote some code.\u00a0 Here is my very simple sketch to slowly count and send the number via serial:\n<pre>int count = 0;\r\n void setup() {\r\n Serial.begin(9600);\r\n }\r\n void loop() {\r\n Serial.println(count++);\r\n delay(1000);\r\n }<\/pre>\n<\/li>\n<li>Ran the code.\u00a0 I uploaded it to the module, opened the serial terminal, and saw that it was counting as designed.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-255\" src=\"http:\/\/www.nathanbak.com\/wp-content\/uploads\/2016\/07\/serialTerminal-300x168.png\" alt=\"serialTerminal\" width=\"300\" height=\"168\" srcset=\"https:\/\/nathanbak.com\/wp-content\/uploads\/2016\/07\/serialTerminal-300x168.png 300w, https:\/\/nathanbak.com\/wp-content\/uploads\/2016\/07\/serialTerminal.png 561w\" sizes=\"auto, (max-width: 300px) 85vw, 300px\" \/><\/li>\n<\/ol>\n<p>Of course it took a bit of kicking and swearing to do that.\u00a0 Here are a few of the things that I did before everything worked:<\/p>\n<ol>\n<li>Ran the Arduino IDE as root<\/li>\n<li>The upload speed is 115200, but the terminal speed is 9600 baud<\/li>\n<li>Change the reset method to &#8220;nodemcu&#8221;.<\/li>\n<li>Sometimes (but not always) hold the flash button and than hit the reset button before I could successfully upload my sketch.<\/li>\n<li>Switch USB cords (the first is a cheap, old cord that in recent years has only been used for charging devices).<\/li>\n<li>Check the port whenever I plugged in the module (it sometimes switched between \/dev\/ttyUSB0 and \/dev\/ttyUSB1 just to spite me).<\/li>\n<\/ol>\n<p>There&#8217;s nothing exciting about my counting program, but by getting it running I confirmed that I can 1) Connect to the module 2) Upload code to it and 3) Run the code.\u00a0 Now that I can do that, I can see what else I can make my new toy do . . .<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today my new toy arrived.\u00a0 It&#8217;s an ESP8266 IOT WiFi Module. Specifically I selected the &#8220;Elecrow ESP8266 IOT Board WiFi Module with Built in USB and Battery Charging&#8221; out of the many ESP8266 variants because of the following features: Onboard USB (I find it easier than FTDI) NOT breadboard friendly (Pins sticking up not down) &hellip; <a href=\"https:\/\/nathanbak.com\/?p=253\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;My New Toy (Part 1)&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[13,10],"class_list":["post-253","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-esp8266","tag-making"],"_links":{"self":[{"href":"https:\/\/nathanbak.com\/index.php?rest_route=\/wp\/v2\/posts\/253","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nathanbak.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nathanbak.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nathanbak.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nathanbak.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=253"}],"version-history":[{"count":4,"href":"https:\/\/nathanbak.com\/index.php?rest_route=\/wp\/v2\/posts\/253\/revisions"}],"predecessor-version":[{"id":258,"href":"https:\/\/nathanbak.com\/index.php?rest_route=\/wp\/v2\/posts\/253\/revisions\/258"}],"wp:attachment":[{"href":"https:\/\/nathanbak.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=253"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nathanbak.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=253"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nathanbak.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=253"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}