• Supports antenna diversity
• Off leakage current is less than 10 µA
• Built-in low power 32-bit CPU which can double
as an application processor
• SDIO 2.0, SPI, UART, and ADC
• Standby power consumption of less than 1.0 m W
In other words, the ESP8266 family of modules
features low power consumption, high RF power output,
and is capable of supporting all of the current 802.11
standards required for Wi-Fi connectivity. In addition, it
supports many industry standard hardware interfaces and
can function as the application processor in many designs
as it does in this one. The ESP8266 is a 3. 3 VDC part.
The NodeMCU module comes from the factory with
the LUA programming environment installed. However,
since the To Y code was written in the Arduino
environment, we will overwrite the factory programming
for this application.
The To Y device uses one digital input pin for
monitoring the request pushbutton switch and three digital
output pins for driving a common cathode RGB LED.
Current limiting for the LED is implemented using 1K ohm
resistors for each of the three colored LEDs
which make up the RGB LED.
To read the switch and drive the RGB LED,
we must establish mapping between the
general-purpose I/O pins Arduino expects and
the physical pins on the NodeMCU module.
Figure 3 shows how the NodeMCU pinout
helps with this task.
The mapping I have chosen for this design
is shown in Table 1.
The To Y software configures these four
I/O lines for the functions shown in the table.
Power for the To Y module is supplied by a
USB power supply/charger capable of at least
one amp at five volts DC. A weak power
supply will cause the hardware to operate
erratically (if at all), so make sure the power
supply you use is up to the task.
To Y devices must be configured before
they will function as a group. For each
member of the group, the following information is
1. A name to be associated with the To Y group
member. This is only used in debugging messages
available through the serial monitor.
2. The SSID or name of the Wi-Fi network the device
will be associated with.
3. The password of the Wi-Fi network the device will
be associated with.
4. A Teleduino key.
5. The selection of an LED lighting pattern for the
Each To Y device in a group must have a unique key
and LED pattern. Also, each device must exist on a
different Wi-Fi network. (With the current software, only
one To Y device can exist on a Wi-Fi network.)
To Y devices use the Teleduino service I described in
my October 2015 article to coordinate their activity. Each
member of a To Y group must be assigned a Teleduino key
After all of the information
about the group members is
gathered, it must be edited into the
devices array within the software (in
the ThinkingOf You.ino file available
at the article link). An example is:
40 November 2015
■ FIGURE 3. NodeMCU Amica module pinout.
Function Configuration NodeMCU Module Pin Arduino GPIO
Request switch Digital input with pull-up D1 GPIO 5
Red LED drive Digital output for PWM D4 GPIO 2
Green LED drive Digital output for PWM RX GPIO 3
Blue LED drive Digital output for PWM D2 GPIO 4