# Internet of Things and Long-Range-Based Smart Lampposts for Illuminating Smart Cities
## 6 Results and Discussion
The realization of smart lighting and environmental sensing smart lampposts is achieved by developing the hardware prototype, which is based on Arduino Uno. Arduino Uno is a microcontroller that is built on the ATmega328P, it comprises 14 digital input/output pins, 6 analog inputs, and an operating voltage of 5 V [42]. For environmental sensing, the DHT11 sensor is interfaced to the digital pin in Arduino Uno, and MQ 7 sensor is interfaced to the ADC pins of the Arduino Uno. To realize smart lighting in smart lampposts, a LDR sensor and passive infrared (PIR) motion sensor are interfaced to the analog pins of Arduino Uno. The image sensing is achieved by integrating the pi camera into the ESP 32 module. The hardware prototype that is developed for environmental sensing and smart lighting is implemented in a real-time environment and it is presented in Figure 10. MQ 7 gas sensor, DHT 11 sensor, PIR motion sensor, and LDR sensor are present in the hardware prototype for sensing the CO level, temperature, humidity, motion sensing, and light intensity. The hardware prototype communicates the sensory data of distinct sensors to the IoT server via internet connectivity through a Wi-Fi modem. The graph in Figure 11a,b reveals the temperature and humidity values at different intervals. In January 2021, at 11:00 p.m., the temperature is recorded as 11 \({}^{\circ}\)C and the humidity is 65%. Between 11:00 p.m. and 11:15 p.m., the temperature increases to 12 \({}^{\circ}\)C and the humidity increases to 75%. Between 11:15 p.m. and 11:30 p.m., the temperature remained constant and, after 11:30 p.m., it rose in temperature (14 \({}^{\circ}\)C); regarding humidity for the same time interval, it is between 70 and 80%. At 11:45 p.m., the temperature declines to 12 \({}^{\circ}\)C, and humidity reaches nearly 70%. The graph in Figure 11c,d reveals the Cox level and light intensity values at a different time intervals. In this study, we have set the threshold for collecting the sample of the LDR sensor value for a time interval of 5 s. An average is calculated for the total number of LDR sensor values that are recorded for a time interval between 11:00 p.m. and 11:15 p.m. Therefore, the values that are utilized for the plotting the graph are the average taken from the total number of LDR sensor values. In January 2021, at 11:00 p.m., the Cox level in the air is above 120 ppm and light intensity is at 1 V (volts). Between 11:00 p.m. and 11:15 pm, the Cox level suddenly declines to 110 ppm and light intensity also declines below 1 V (volts). Between 11:15 p.m. and 11:30 p.m., the Cox level is between 115 and 120 ppm  
Figure 10: Environmental Parameter Sensing Prototype. and, after 11:30 pm, there is declining in the Cox level; regarding light intensity for the same time interval, there is a sudden rise in intensity of light. At 11:45 p.m., the Cox level is in between 110 and 115 ppm and light intensity is in between 1 and 1.3 V (volts). From the above discussion regarding the two graphs, it can be concluded that the cloud server is useful for continuous, real-time monitoring of temperature, humidity, Cox level, and light intensity. The image sensing prototype is developed by integrating an ESP 32 cam-based module. The ESP 32 module is the hybrid module that is inbuilt with a camera, Bluetooth, and IEEE 802.11 b/g/n based Wi-Fi module [43]. The working architecture of the image sensing prototype is illustrated in Figure 12.  
Figure 11: Sensing Data on the Cloud Server. Figure 12: Working architecture of image sensing prototype. The ESP 32 controller takes the input frames from the integrated cam module and then processes them by resizing, formatting, etc. It then sends the pre-processed frames to the connected mobile phone or computer through the local network.