For our first component, we have RGB LED that will light up our enclosure and give us cool notifications on air conditions.

2.1. RGB LED explained

RGB (Red, Green, Blue) LED lights are 5mm units that have four pins - one for each of the colors mentioned and one for a common cathode (ground which is also the longest one).


Red, ground, blue and green legs of the LED light. Make sure not to get them switched up!

2.2. Connecting it to breadboard


Place the LED as shown in the picture (use pins I8 to I11).

Make sure that you place the legs correctly (the longest one, ground leg, is second from the left).

2.3. Adding a resistor


Place a 100Ω resistor (holes F8 to E8) next to it as shown in the picture.

2.4. Connecting it to NodeMCU


To connect your light, use jumper cables again and connect them to NodeMCU.

Red LED leg connects to D2, blue leg to D5, green leg to D6 and ground leg (the longest one, remember?), connects to ground strip (guessed it right, the column with - sign).

Wow, you are getting good at this!