## 3 The Results and Discussion
After receiving information from humidity, temperature and CO\({}_{2}\) sensors, data analysis is performed and comparison is made to see if the environmental parameters are appropriate and correspond to the mushroom growth conditions [3]. After performing the analysis and receiving information from the sensors about deviations of the environmental parameters (temperature, humidity and CO\({}_{2}\)), the regulators of these parameters are turned on or off (using MOSFETs and relay circuits), respectively, air conditioner, fan or humidifier. The status information of environmental sensors and environmental parameter maintaining devices is transmitted to the central computer, which also houses the system management application. Later, it is returned to the initial state of the algorithm \"Start program\" and the process is repeated. Figure 3: Main PLC communication power plant circuit. Since both the sensors and the environmental parameters maintenance devices are located in two rooms, a data transmission network is required. The conceptual diagram of the data transmission network between the sensors and the PLC communication board is presented in Figure 6. This diagram shows how digital information is transferred between the sensor control modules and the central controller communication board. 5 V level digital signals are used to transmit information packets, while 12 V level digital signals are used for request-excitation [6]. A twisted pair of wires is used to send these packets. RS 485 interface modules are used to receive and send information packets between individual modules. The general scheme of the data network is presented in Figure 7. The complete set of the data network consists of a PLC communication board, control modules for CO\({}_{2}\) sensors (two units), temperature and humidity sensors (eight units). RS 485 interface modules installed on all system PCBs are used to ensure the entire operation of the data transmission network. A software application was developed using the programming language Delphi to ensure the monitoring and control of the environmental parameters of the mushroom growing premises. The main graphic window of system application management is presented in Figure 8. In the main window of the application, you can see the values of the environmental parameters of the two mushroom growing rooms, which are recorded by the environmental sensors. In the main window of the management application, the ON/FF statuses of environmental parameter control devices (e.g., air conditioners, etc.) can be monitored. In order for the entire mushroom growing conditions control system to work in autonomous mode, the \"auto\" mode must be selected in the control application. Figure 4: Sensor communication circuit. The conditions for growing the mushrooms depend on the type of mushrooms and the age of the mushroom plants. It is important to determine and maintain the appropriate environmental conditions when growing the different species of mushrooms. The control application has a program window for setting the operating values of devices that support environmental parameters (such as air conditioners, etc.) (Figure 9). In the window of the program, the boxes to change the parameters of the devices for maintaining the environmental conditions in the rooms to grow the mushrooms can be seen. After setting the required parameter values, in the main window of the application the autonomous mode can be selected, then the system can operate for the desired period of time without additional intervention of an operator. There are also possibilities to save the values of the set parameters so that they can be known in the future. In the control application, it is possible to record the average values and perform a reboot of the entire system. Figure 3.0 The algorithm of the program of the automatic system of maintaining conditions for growing mushrooms. Figure 3.1 Management application to control the mushroom growing conditions.