Mini project 2 – Controlling a NodeMCU LED from the Node-RED dashboard
The project’s aim is to control the onboard NodeMCU LED using a switch widget on our Node-RED dashboard, where we will be using MQTT as our primary communication protocol. We will proceed step by step, covering the hardware requirements, software setup, code explanation, and project demonstration.
Let's first start with the hardware requirements for this project.
Hardware requirements
This is a very simple project so the hardware requirements are quite straightforward:
- A NodeMCU development board
- A Raspberry Pi
Information about both these devices has been covered in detail in the previous chapters. In the later sections, device-specific instructions that need to be followed will be listed.
Software requirements
As for the software requirements, only the Raspberry Pi needs to be considered as the NodeMCU code explanation will come later.
The following should...