## 3 Results and Discussion
The algorithm of the main microcontroller program is presented in Figure 6. The algorithm consists of the following sequence of main actions: tracking information is displayed on the screen; configurable inertial sensor--parameters are transmitted via the SPI protocol to generate a signal via the INT1 output when the sensor detects an impact force exceeding the set limit of 5 g; a 30 min timer is set--the controller is prepared so that after falling asleep, it wakes up after 30 min; wake-up due to a shock is configured--the controller is prepared so that, in sleep mode, it waits for a signal from the INT1 sensor; and the main processor is put to sleep. The main processor of the controller is put to sleep, waiting for the following signals prepared by the auxiliary processor from the impact sensor and timer: Is the device on? Is the controller still receiving power? Did the device wake up from sleep? Waiting for the controller to wake up, the signal is as follows: Woke up to a shock? Information is obtained on the reason for the wake-up of the controller and whether it was due to the input INT1 logic unit. Information stored in the inertial sensor is read--information is read from the z, y, z registers 32 times, thus collecting all of the information stored in the FIFO buffer. The information is saved on the memory card and on the screen, and then it is added to the csv (comma-separated values) file (created if it does not exist). In total, this results in 34 lines: one each for axis names and 32 lines for the measurement results. If the impact exceeds the limit of 20 g, the screen of the background changes to red. It scans for available access points and connects if found, and the information about the shipment number is passed to the warehouse server. Figure 5: General view of the impact recorder body. A portion of the main microcontroller program code is shown in Figure 2.0 At first, the program records the time and counts how long it slept. This is needed in cases where the controller wakes up without a timer, so that it can only be restarted for the remaining time, such as another 20 min. Next, every time it turns on or wake up, the processor needs to reconfigure the SPI device for communication with the inertial sensor. After receiving the reason for waking up, if due to shock, the function \"shock_information_output\" is launched, which reads the inertial sensor and writes the data to the memory card, and if the shock force exceeds the limit of 20 g, it changes the background of the screen from white to red, tries to connect to the Wi-Fi access point, and sends information to the server. If it wakes up due to the timer, it tries to connect to the Wi-Fi access point and send information to the server. If it is not a wake-up, but instead the program is launched for the first  
Figure 2.1 Algorithm of the main microcontroller program. time after switching on, the inertial sensor is configured and the shipment number with a barcode (Code-128) is displayed on the screen. This is stored as an image in an array of eight pixels. In the array, the pixels of the image (one bit each) are arranged in order as intended on the screen, from right to left and from the eighth pixel up. The code prepares immutable HTTP \"POST\" requests to transmit information to the warehouse server. When compiling a program, the compiler inserts three constants that specify the path to the query. This is carried out so that the control does not have to perform operations with the text. The impact detector in warehouses connects to local servers with a static IP address through wireless routers (here, a wireless access point, a switch, and a router on one device). The local servers, after receiving the logger's tracking number and determining whether the hit limit has already been exceeded, attach the warehouse address and transmit it to the central servers. Users will be able to connect to one of the central servers with a mobile application via the Internet.