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 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.
|Pin||NodeMCU||IoTBox use||Future Use
|tx||tx on programmer||Additional I/O|
|rx||rx on programmer||Additional I/O|
|gpio4||D2||to I2C – SCL screen (GPIO4 is sometimes mislabelled labelled as GPIO5 on breakout board!!!)|
|gpio15||D8||resistor 150 ohm to led = RED|
|gpio2||D4||data pin for 1-wire ds18b20 (or dht22 with 10k resistor to vcc)|
|gpio0||D3||push to make switch (optional:held high via 10k resistor?). Other side of switch is at GND|
|gpio14||D5||to I2C – SDA screen|
|gpio12||D6||resistor 150 ohm to led = BLUE|
|gpio13||D7||resistor 150 ohm to led = GREEN|
|vcc||3.3 volts (NOT 5v!)|
|ch_pd||n/c (held high on the breakout board)|
|adc||A0||n/c||Potentiometer / Light detection|
(Corrected Pins for the colours Blue and Green)
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).
Here is the commandline to flash the esp8266, (please remember that the esp8266 is 3.3v only – the 5v usb interfaces will kill it!)
(All on one line, may need python2.7 installed for esptool.exe. My USB programmer is using COM2)
esptool.exe -p com2 -b 115200 write_flash -fs 32m 0x00000 rboot.bin 0x02000 iotbox.bin 0x80000 iotbox.espfs.bin
The required files are here.
However, the esptool.exe requires Python to be installed on yourWindows PC – this can cause issues. An alternative ESP8266 flasher is here: Electrodragon.com