My task was to build an inertial measurement unit (IMU) module for the quadcopter being developed by the department. The module is designed to measure the distance from the ground, so that this data could be used in further applications for the quadcopter such as control.
First thing was to study the fundamentals of three sensors (distance measuring, acceleration measuring and gyroscope) as well as how they work. Next I connected these sensors to the DISCOVERY board, so I would be able to calculate the height from the data received. For this to work I implemented different analogue and digital communication interfaces, which are used in embedded systems (ADC, SPI, I2C).
As for software: I implemented the necessary peripheral devices using the most recent HAL drivers (as opposed to the old, non-standardized ones). My aim was for each task to use a different thread, while still communicating with each other. To achieve this I used CMSIS real-time operating system (RTOS).
Last but not least I measured the output and analysed the resulting data (height and previous calculations), to see how they compared to reality.