## 1 Introduction  
Recently, more and more attention has been paid to increasing work efficiency and to reducing costs. In addition, great attention is paid to reducing service staff. These aspects of increasing the efficiency of the production process are becoming more and more important in agriculture, in the cultivation of various food crops, etc. In order to cope with today's challenges, various technological solutions based on innovation are needed [1, 2, 3, 4]. One of such areas, that requires innovative solutions for growing and monitoring envi-ronmental parameters, is the cultivation of various edible mushrooms. Mushrooms are grown industrially in various types of premises (greenhouses, hangars, etc. ), where it is technically and technologically possible to ensure the necessary conditions for the growth process. In order to optimize the growth process of the mushrooms, it is necessary to en-sune both observation and monitoring of indoor environmental parameters, as well as control of environmental parameters. In mushroom cultivation, it is important to monitor such environmental parameters as CO\({}_{2}\) concentration level, humidity, temperature, etc. [4, 5, 6, 7, 8]. In order to monitor various environmental parameters, various types of sensorsare needed, which collect information and send it to a central computer or microcontroller. Sensors can be of various types: 1. Optical sensors are often used in drone or other systems to determine soil moisture; 2. Electromagnetic sensors that can be inserted into the soil are used to measure soil pH, salinity level, etc. ; 3. Electrochemical sensors that are used to determine various ions such as K\({}^{+}\), H\({}^{+}\), etc. ; 4. Location sensors such as GPS are needed to ensure efficient fertilization of fields; 5. Air flow sensors are used to measure the amount of air in the soil; 6. Acoustic sensors are used, e.g., to detect pests in the mushroom growing premises [9; 10; 11]. Both the microcontroller and the computer analyse the information received from various sensors and make appropriate decisions on how one or another environmental parameter can be adjusted (e.g., temperature, humidity, etc.). Environmental parameter correction decisions are made either by a dedicated program on a computer or microcontroller, or by the operator of this system. Decision-making related to the management and correction of environmental parameters depends on the architecture of the electronic sys-tem. Artificial intelligence is increasingly used for parameter control and decision-making. Such a system makes it possible to significantly reduce the probability of errors in the control of growing conditions and environmental parameters. Such systems can be completely autonomous and operate without human intervention for a long time. At the same time, in order to control the parameters and make corrections, not only the sensor system is needed, but also various devices (water pumps to maintain humidity, heaters and recuperators to maintain temperature, etc.) [12; 13; 14; 15]. The control of devices that ensure the control of environmental parameters can be carried out by the same system, which simultaneously processes sensor information and makes appropriate decisions related to changing environmental parameters. The control of various devices can be carried out using relay circuits or with the help of powerful transistors (e.g., MOSFETs) by cutting off or turning on the power supply at certain moments of time. Industrial controllers, such as Siemens, can be used to control devices and analyze information from sensors, and also electronic circuit-based programmable microcontrollers such as PIC or Arduino [16; 17; 18]. In order to simplify the electric circuits and make their work as simple as possible, optimization tasks are often solved, allowing to reduce the production costs of control systems and helping to ensure their stable operation.