## 3 The Proposed IoT-Based Master-Slave Regionalized Intelligent LED Light-Controlling System
### Hardware Implementation of the Proposed System  
Figure 6 shows a hardware block diagram of the proposed IoT-based intelligent LED light. The power supply module adopts 110/220 V universal voltage. The central processing unit (MCU) [36] executes according to the parameter value sent by the communication module. Moreover, the MCU sends a control command to the LED brightness control module to determine the power ratio and intensity of the LED high-/low-light duration. The communication module is a Wi-Fi 2.4 GHz wireless transmission module responsible for data transmission with the cloud and transmission between the proposed IoT-based intelligent LED lights. The communication module in Figure 6 is a Wi-Fi module, and its data transmission methods can generally be divided into two types: message-queuing telemetry transport (MQTT) and the HyperText transfer protocol (HTTP). We use the MQTT architecture. This is because compared to the HTTP architecture, MQTT architecture is in transmission and can reduce power consumption. In addition, the MCU of the IoT LED in Figure 6 will be responsible for uploading the collected data to the cloud. The current data are the trigger time of the personnel, the number of people passing by each hour, etc. These data can be used in future strategies, and more can be added in the future, such as for detecting smoke, CO\({}_{2}\), PM2.5, etc., and other sensors to make the IoT LED more powerful. In addition, with the parameters uploaded to the cloud via the web, such as field F, high-light mode power W\({}_{\rm H}\), low-light mode power W\({}_{\rm L}\), and high-light duration \(T\), the IoT LED will actively receive and store these parameters. The communication transmission we adopt in this article is based on the MQTT architecture [31; 34]. Hence, the proposed system can synchronize the time with the central server every minute, avoiding related problems caused by mistimed synchronization and data delay, described as follows:  
Figure 6: Hardware block diagram of the proposed IoT-based intelligent LED light (IoT LED). The finite element machine architecture is used to write programs, so the proposed IoT-based intelligent LED light will automatically ignore it to avoid errors when false data injection happens. 2. A timestamp scheme is used as the data recognition judgment, so the same timestamp will only recognize one piece of data, and the data with errors due to delay will be ignored. 3. The solution to the first two problems can prevent system resources from being exhausted due to several applications. An example of the preset values and settable ranges of the proposed IoT-based intelligent LED light parameters can be seen in Table 4. In this work, the parameters set include field F, high-light mode power W\({}_{\rm H}\), low-light mode power W\({}_{\rm L}\), and high-light duration T. These parameters are set to preset (default) values at the factory. Users can access the proposed IoT-based intelligent LED light via the internet to modify it. The setting range is shown in Table 1. The modified parameter values will also be uploaded to the cloud through the Wi-Fi 2.4 GHz wireless transmission module for big data analysis, which can set parameters for valuable suggestions in the future. The prototype of the proposed IoT-based intelligent LED light is demonstrated in Figure 7.