## 3 Experimental Data and Results
### Utility of Environmental Sensors in Mobile Telephony in the Direct Communication Process  
Experiments performed in a controlled environment showed aspects of the ambient light sensor that detect light differently depending on the background of the area in which the device is located. In what follows, the aspects obtained in the measurements are highlighted, and it is underlined that depending on the intensity, the ambient noise can increase the bit error rate (BER). Therefore, in this case, an algorithm was optimized and created that would configure the adaptive sensor to adjust the minimum and maximum threshold values that cannot interfere with the data transmission. The initial sensor reads the ambient lights and then creates a matrix to observe certain characteristics. Subsequently, the application is channeled on the minimum and maximum values observed in a matrix. Therefore, the application identifies the minimum and maximum values that set a minimum luminance threshold, and then the application displays a warning message regarding the color, distance and other information received. To completely rule out interference, the situation must be managed by an LED configuration with a stable luminance in the broadcast areas. The long-distance and angle calibration process includes aspects that can affect the demodulation process of the LED. When configuring the ambient noise, an LED can transmit binary data approximately 8 bits of 0, then it can resume a new cycle with 8 bits of 1. The application creates observational data from the nearby area to the distance when it can still detect the LED light. After the distance calibration process, the LED can transmit  
Figure 11: Determination of key points by detection frames; (**a**) reception area, (**b**) image in original format. Figure 12: Before and after the process of constraining a data set (quantization). the same numbers of 0 and 1 in binary code to be able to calibrate the sensor at different angles, having that FOV in which the quality can be differentiated by the angles from which the light comes. The Android application asks the user to change the position of the device from 45\({}^{\circ}\) to 145\({}^{\circ}\) to take landmarks in future readings. With all these observational data, iterations can be run for the minimum and maximum luxury values in setting the threshold for the logical states of 0 and 1. Following the presentation of the application and the configuration we made for the indoor and outdoor environment, we used a 6.5-inch mobile device, on which the Android application developed was installed to calibrate the environmental sensor and setting threshold values as later this would determine if the illumination is in the range of 0 to 1. Subsequently, the application should show whether the read thresholds identify a light that is in the spectrum of those that are identified as dangerous (red, yellow, or strong flashes of the headlights can affect data analysis, and the display is limited only by their quantity). In order to obtain the data, we converted the objects into strings, based on the specific formats iterated in a string. According to the sequences in Figure 13, we observe the general use of string conversion methods formed to \(Str\). When an object to be inserted after reading is not found in the procedure string, it is called to perform the conversion. If the concatenation index is 1, then the value is inserted into the string. The string is limited to 8 because larger messages can make communication, analysis or processing more difficult. The size is sufficient according to the nomenclature dedicated to road warning messages. After setting the length and characters of the message, we can move on to the next step when comparing events with the existing data set and parameters in the application. Thus, after constructing the identification process and defining the light intensity, each data set is parsed, and an object defined as luminance with values of 0 and 1 is created following the concatenation of the binary string.