{"id":89,"date":"2015-09-13T16:15:33","date_gmt":"2015-09-13T16:15:33","guid":{"rendered":"http:\/\/www.spants.com\/blog\/?p=89"},"modified":"2016-02-05T11:16:29","modified_gmt":"2016-02-05T11:16:29","slug":"iotbox-pinouts","status":"publish","type":"post","link":"http:\/\/www.spants.com\/blog\/iotbox-pinouts\/","title":{"rendered":"IoTBox Pinouts and Firmware loading"},"content":{"rendered":"<p>Here are the pinouts that are defined in the firmware for the IoTBox based on the ESP12 adapter board shown below. It is possible to solder directly to the ESP chip if space is tight but you will need to take into account the various pull ups (eg CH_PD) if you do so.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.spants.com\/blog\/wp-content\/uploads\/2015\/09\/espadapter.jpg\"><img loading=\"lazy\" class=\"size-medium wp-image-90 alignright\" src=\"https:\/\/i0.wp.com\/www.spants.com\/blog\/wp-content\/uploads\/2015\/09\/espadapter.jpg?resize=300%2C240\" alt=\"espadapter\" width=\"300\" height=\"240\" srcset=\"https:\/\/i0.wp.com\/www.spants.com\/blog\/wp-content\/uploads\/2015\/09\/espadapter.jpg?resize=300%2C240 300w, https:\/\/i0.wp.com\/www.spants.com\/blog\/wp-content\/uploads\/2015\/09\/espadapter.jpg?w=688 688w\" sizes=\"(max-width: 300px) 100vw, 300px\" data-recalc-dims=\"1\" \/><\/a>In order to do the initial programming and testing of the module, install the VCC, GND, GPIO0 cables and pins for TX and RX. If you are using a larger box, you may use jumper pins for all of the connections.<\/p>\n<table style=\"background-color: #bdeff0; height: 628px;\" width=\"366\">\n<tbody>\n<tr>\n<td><strong>Pin<\/strong><\/td>\n<td><strong>NodeMCU<\/strong><\/td>\n<td><strong>IoTBox use<\/strong><\/td>\n<td><strong>Future Use<br \/>\n<\/strong><\/td>\n<\/tr>\n<tr>\n<td>tx<\/td>\n<td><\/td>\n<td>tx on programmer<\/td>\n<td>\u00a0Additional I\/O<\/td>\n<\/tr>\n<tr>\n<td>rx<\/td>\n<td><\/td>\n<td>rx on programmer<\/td>\n<td>\u00a0Additional I\/O<\/td>\n<\/tr>\n<tr>\n<td>gpio4<\/td>\n<td>D2<\/td>\n<td>to I2C &#8211; SCL screen (GPIO4 is sometimes mislabelled labelled as GPIO5 on breakout board!!!)<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>gpio5<\/td>\n<td>D1<\/td>\n<td>n\/c<\/td>\n<td>PIR, Vibration<\/td>\n<\/tr>\n<tr>\n<td>gnd<\/td>\n<td><\/td>\n<td>0 volts<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>gpio15<\/td>\n<td>D8<\/td>\n<td>resistor 150 ohm to led = RED<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>gpio2<\/td>\n<td>D4<\/td>\n<td>data pin for 1-wire ds18b20 (or dht22 with 10k resistor to vcc)<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>gpio0<\/td>\n<td>D3<\/td>\n<td>push to make switch (optional:held high via 10k resistor?). Other side of switch is at GND<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>gpio14<\/td>\n<td>D5<\/td>\n<td>to I2C &#8211; SDA screen<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>gpio12<\/td>\n<td>D6<\/td>\n<td>resistor 150 ohm to led =\u00a0BLUE<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>gpio13<\/td>\n<td>D7<\/td>\n<td>resistor 150 ohm to led =\u00a0GREEN<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>vcc<\/td>\n<td><\/td>\n<td>3.3 volts (NOT 5v!)<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>gpio16<\/td>\n<td>D0<\/td>\n<td>n\/c<\/td>\n<td>Wake<\/td>\n<\/tr>\n<tr>\n<td>ch_pd<\/td>\n<td><\/td>\n<td>n\/c (held high on the breakout board)<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>adc<\/td>\n<td>A0<\/td>\n<td>n\/c<\/td>\n<td>Potentiometer \/ Light detection<\/td>\n<\/tr>\n<tr>\n<td>reset<\/td>\n<td><\/td>\n<td>n\/c<\/td>\n<td><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>(Corrected Pins for the colours Blue and Green)<\/p>\n<p>You will need to do an initial flash of the IoTBox chip which will then allow you to do the upgrades from the built in menu. Connect a 3.3v USB FTDI programmer to TX\/RX and GND. Connect GPIO0 to GND and then power up the module from a source that supports around 300ma (do not power from the FTDI module).<br \/>\nHere is the commandline to flash the esp8266, (please remember that the esp8266 is 3.3v only &#8211; the 5v usb interfaces will kill it!)<\/p>\n<p>(All on one line, may need python2.7 installed for esptool.exe. My USB programmer is using COM2)<\/p>\n<p><code>esptool.exe -p com2 -b 115200 write_flash -fs 32m 0x00000 rboot.bin 0x02000 iotbox.bin 0x80000 iotbox.espfs.bin<\/code><\/p>\n<p>The required files are <a href=\"https:\/\/www.dropbox.com\/sh\/36qijt8lvo0ni54\/AABgSCigkPNGXLFSZSM_RFaba?dl=0\" target=\"_blank\">here<\/a>.<\/p>\n<p>However, the esptool.exe requires Python to be installed on yourWindows PC &#8211; this can cause issues. An alternative ESP8266 flasher is here: \u00a0<a href=\"http:\/\/www.electrodragon.com\/w\/ESP8266_firmware_flasher\" target=\"_blank\">Electrodragon.com<\/a><\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.spants.com\/blog\/wp-content\/uploads\/2015\/09\/Screen-Shot-2015-10-02-at-22.46.07.png\"><img loading=\"lazy\" class=\"size-medium wp-image-117 aligncenter\" src=\"https:\/\/i0.wp.com\/www.spants.com\/blog\/wp-content\/uploads\/2015\/09\/Screen-Shot-2015-10-02-at-22.46.07.png?resize=206%2C300\" alt=\"Screen Shot 2015-10-02 at 22.46.07\" width=\"206\" height=\"300\" srcset=\"https:\/\/i0.wp.com\/www.spants.com\/blog\/wp-content\/uploads\/2015\/09\/Screen-Shot-2015-10-02-at-22.46.07.png?resize=206%2C300 206w, https:\/\/i0.wp.com\/www.spants.com\/blog\/wp-content\/uploads\/2015\/09\/Screen-Shot-2015-10-02-at-22.46.07.png?w=421 421w\" sizes=\"(max-width: 206px) 100vw, 206px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<div class=\"sharedaddy sd-sharing-enabled\"><div class=\"robots-nocontent sd-block sd-social sd-social-icon sd-sharing\"><h3 class=\"sd-title\">Share this:<\/h3><div class=\"sd-content\"><ul><li class=\"share-twitter\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-twitter-89\" class=\"share-twitter sd-button share-icon no-text\" href=\"http:\/\/www.spants.com\/blog\/iotbox-pinouts\/?share=twitter\" target=\"_blank\" title=\"Click to share on Twitter\"><span><\/span><span class=\"sharing-screen-reader-text\">Click to share on Twitter (Opens in new window)<\/span><\/a><\/li><li class=\"share-facebook\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-facebook-89\" class=\"share-facebook sd-button share-icon no-text\" href=\"http:\/\/www.spants.com\/blog\/iotbox-pinouts\/?share=facebook\" target=\"_blank\" title=\"Click to share on Facebook\"><span><\/span><span class=\"sharing-screen-reader-text\">Click to share on Facebook (Opens in new window)<\/span><\/a><\/li><li class=\"share-reddit\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"\" class=\"share-reddit sd-button share-icon no-text\" href=\"http:\/\/www.spants.com\/blog\/iotbox-pinouts\/?share=reddit\" target=\"_blank\" title=\"Click to share on Reddit\"><span><\/span><span class=\"sharing-screen-reader-text\">Click to share on Reddit (Opens in new window)<\/span><\/a><\/li><li class=\"share-email\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"\" class=\"share-email sd-button share-icon no-text\" href=\"http:\/\/www.spants.com\/blog\/iotbox-pinouts\/?share=email\" target=\"_blank\" title=\"Click to email this to a friend\"><span><\/span><span class=\"sharing-screen-reader-text\">Click to email this to a friend (Opens in new window)<\/span><\/a><\/li><li class=\"share-end\"><\/li><\/ul><\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>Here are the pinouts that are defined in the firmware for the IoTBox based on the ESP12 adapter board shown below. It is possible to solder directly to the ESP chip if space is tight but you will need to take into account the various pull ups (eg CH_PD) if you do so. In order &hellip; <a href=\"http:\/\/www.spants.com\/blog\/iotbox-pinouts\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">IoTBox Pinouts and Firmware loading<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n<div class=\"sharedaddy sd-sharing-enabled\"><div class=\"robots-nocontent sd-block sd-social sd-social-icon sd-sharing\"><h3 class=\"sd-title\">Share this:<\/h3><div class=\"sd-content\"><ul><li class=\"share-twitter\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-twitter-89\" class=\"share-twitter sd-button share-icon no-text\" href=\"http:\/\/www.spants.com\/blog\/iotbox-pinouts\/?share=twitter\" target=\"_blank\" title=\"Click to share on Twitter\"><span><\/span><span class=\"sharing-screen-reader-text\">Click to share on Twitter (Opens in new window)<\/span><\/a><\/li><li class=\"share-facebook\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-facebook-89\" class=\"share-facebook sd-button share-icon no-text\" href=\"http:\/\/www.spants.com\/blog\/iotbox-pinouts\/?share=facebook\" target=\"_blank\" title=\"Click to share on Facebook\"><span><\/span><span class=\"sharing-screen-reader-text\">Click to share on Facebook (Opens in new window)<\/span><\/a><\/li><li class=\"share-reddit\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"\" class=\"share-reddit sd-button share-icon no-text\" href=\"http:\/\/www.spants.com\/blog\/iotbox-pinouts\/?share=reddit\" target=\"_blank\" title=\"Click to share on Reddit\"><span><\/span><span class=\"sharing-screen-reader-text\">Click to share on Reddit (Opens in new window)<\/span><\/a><\/li><li class=\"share-email\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"\" class=\"share-email sd-button share-icon no-text\" href=\"http:\/\/www.spants.com\/blog\/iotbox-pinouts\/?share=email\" target=\"_blank\" title=\"Click to email this to a friend\"><span><\/span><span class=\"sharing-screen-reader-text\">Click to email this to a friend (Opens in new window)<\/span><\/a><\/li><li class=\"share-end\"><\/li><\/ul><\/div><\/div><\/div>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true},"categories":[4,2],"tags":[9],"jetpack_featured_media_url":"","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6n7xT-1r","_links":{"self":[{"href":"http:\/\/www.spants.com\/blog\/wp-json\/wp\/v2\/posts\/89"}],"collection":[{"href":"http:\/\/www.spants.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.spants.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.spants.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.spants.com\/blog\/wp-json\/wp\/v2\/comments?post=89"}],"version-history":[{"count":11,"href":"http:\/\/www.spants.com\/blog\/wp-json\/wp\/v2\/posts\/89\/revisions"}],"predecessor-version":[{"id":140,"href":"http:\/\/www.spants.com\/blog\/wp-json\/wp\/v2\/posts\/89\/revisions\/140"}],"wp:attachment":[{"href":"http:\/\/www.spants.com\/blog\/wp-json\/wp\/v2\/media?parent=89"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.spants.com\/blog\/wp-json\/wp\/v2\/categories?post=89"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.spants.com\/blog\/wp-json\/wp\/v2\/tags?post=89"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}