- LoLin NodeMCU v3
- 5x Jumper Cables
- KY-040 Rotary Encoder
- 4x M3 Screws
- 2x M2 Screws
- 3D Printed Case
- 3D Printed Knob (I recommend this one: Printables)
-
Plug the Jumper Cables as follows;
KY-040 NodeMCU CLK D7 DT D6 SW D5 + 3V GND G -
Screw NodeMCU to the case with M3 screws as shown in the image.
-
Screw the rotary encoder to the case with M2 screws as shown in the image.
-
Put the knob on the rotart encoder.
- Install the required drivers.
- Install the "EncoderButton" library.
- Edit code and add your wifi password and ssid.
- Enable "Lan Control" in the advanced setting tab on the Yeelight app.
- Compile & Upload the code!