## 2 Materials and Methods
### Assembly and Programming  
The most important components of the mechanical part of the construction were produced using additive manufacturing methods and then assembled into the final product using standardized connecting elements, such as screws and nuts. During the assembly, only basic workshop tools, such as metric wrenches, pliers, and screwdrivers were used. The assembly of the electronic part was more complex and time-consuming. Due to the significant criterion of the prosthesis cost, generally available and inexpensive electronic components were used. The terminal outputs were soldered into the microcontroller module. The same was conducted with the BNO055 module accelerometer, gyroscope, and magnetometer (Bosch Sensortec Company, Reutlingen, Germany). In order to ensure better connection and reduce disturbances resulting from the assembly method, the force sensor was directly soldered into the HX711 amplifier module (Figure 14). This transducer can operate at a frequency of up to 80 Hz and provides a measurement resolution of 24 bits. It is equipped with a low-noise preamplifier. Figure 13: Printing processes of the mechatronic prosthesis: (**a**) planned batch #1; (**b**) planned batch #2; and (**c**) batch #1 during printing. Finally, the electronic components were connected to each other according to the diagram shown in Figure 15. Components ready for connection and basic testing are presented in Figure 16.  
Figure 14: Force sensor soldered to the HX711 module. Figure 15: Wiring diagram of the electronic system of the prosthesis. The electronic components were connected to the mechanical part of the prosthesis using screws and adhesive connections. The major volume of parts of the electronic system was able to be housed within the cavities of the forearm of the prosthesis. The force sensor had an initial pre-tension due to the small variations in mounting hole spacing between the CAD project and additively manufactured parts, which was then taken into account by the data collection method. Powering the electronic system requires two different voltages. The SD card reader operates at a voltage of 3.3 V, while all other components require a voltage supply of 5 V. The battery power is connected to the Arduino module via the USB connector, which converts them to the appropriate values for each of the connected modules. The programming of the control code for the prosthetic electronic component was accomplished using the Arduino programming environment version 1.8. The BNO055 inertial sensor module had to be initialized before the working loop. The BNO055 sensor used in the measurement system is based on a 32-bit Cortex M0+ microcontroller. It is equipped with an external 23.768 kHz crystal for greater accuracy. It is equipped with two I2C and UART interfaces. The second of these interfaces is used in the device. Its main advantage is the ability to directly convert quaternion or Euler angle values from the sensor without the need for microcontroller filtering. Determination of the absolute value in Euler angles is carried out on the sensor with a frequency of 100 Hz. All measurement data are read by the microcontroller program and sent serially to be eventually stored on the SD card. Communication with the SD card module was performed via the SPI interface. The datafile consisted of lines. Each line started with a timestamp, followed with three recorded Euler angles, and followed with a recorded force value (Figure 17). The data were saved on an SD card, which made the measurements independent of communication with external devices, and also allowed tests to be performed without the need to run specialized software. For this, the measurement was not limited by the distance of the transmitter from the receiver. Here, it must be mentioned that the SD card storage solution is preliminary and temporary, for experimental purposes only, where the sensor data are analysed post fact (after getting off the bicycle).