## 3 Results  
### Construction and Setup of a Measuring Device for Determining Plant Pigment Values  
Figure 2 shows the distribution of data between the real values of the RGB model for the reference scale and those measured with a TCS230 sensor. The accuracy is sufficient, but the deviations between the real and sensor-measured values of the color components are due to the lack of an infrared filter on the sensor. The following correction equations are derived:  
\[R_{c}=0.839R_{m}+45.171 \tag{12}\]  
\[G_{c}=0.7305G_{m}+62.332 \tag{13}\]  
\[B_{c}=0.7213B_{m}+38.729 \tag{14}\]  
where \(R_{c}\), \(G_{c}\), and \(B_{c}\) are the corrected values of the RGB components; \(R_{m}\), \(G_{m}\), and \(B_{m}\) are the values measured with the sensor. In Figure 3, the RGB values are presented in three variants: the original TCS230 sensor measurements, those from a standard scale, and their corrected values after applying the correction equations. When observing the corrected values, it became apparent that the colors noticeably converged with those of the standard reference scale. Figure 3: Colors of reference scale patches and the TCS230-measured and -corrected values: (**a**) standard; (**b**) measured with TCS230; (**c**) corrected values of TCS230. Figure 2: Correction equations: (**a**) R; (**b**) G; (**c**) B. Figure 4 depicts an electrical diagram of the developed measuring device. The entire system is powered by a Power Bank-type battery, which provides the necessary electrical supply. The LED is activated by a 200 \(\Omega\) resistor connected to its anode. The display is connected to the primary serial port of a Mega 2560 microcontroller, utilizing pins D0 and D1 for data output. The control inputs (S0-S3) of the TCS230 sensor, responsible for switching the R, G, and B color matrices, are connected to pins D4-D7 of the microcontroller. The frequency output (OUT) of the sensor is connected to pin D8 of the microcontroller, allowing for data acquisition and processing. This electrical setup enables the proper functioning of the measuring device, facilitating the accurate measurement and display of data. A block diagram of the algorithm for the operation of the developed device is shown in Figure 5. At the beginning of the single-board computer program, the color-matching functions of the TCS230 sensor are introduced. The control pins of the four sensors, the R, G, B, and C matrices, are defined. The device is initialized, and the communication speed between the single-board computer and the display over the serial channel is set to 9600 bit/s. The maximum transmittance values are determined. When the device is initially stratified, the sensor cell must be tightly closed, and there can be no object between the diode and the sensor. The sensor's R, G, B, and C data are read sequentially, and correction equations are applied to them. The corrected values are sent to the GUI for visualization. The calculated RGB values are converted into transmission spectra. The ratio between the measured and maximum transmittance spectra is calculated, which represents the final spectral transmittance characteristic. The data from it are sent to the display for visualization. Based on the data obtained from the last spectral characteristic, the CCI is calculated, and from it, the pigment and nitrogen contents of the measured plant are determined. Figure 6 shows the graphical user interface (GUI) screens of the developed device. The graphical interface consists of four main screens. After turning on the device, the \"Main Menu\" screen appears, through which the others are accessible. The \"Measure\" screen presents, in numerical form, the measurements of the main pigments and nitrogen. The \"Spectra\" section shows the corrected RGB values, the transmission spectra at different spectral wavelengths, and data on the transmission spectral characteristics in graphical form. The \"Help\" menu displays information about the main measured values from the device, including name and measurement units.