Incorporating RTOS into a simple sensor interfacing project for learning purpose
Sure you can use RTOS even for small projects, even when it might make little sense, it is better to start with simple project than to start with complex project. ST officially supports FreeRTOS with STM32 MCUs. Read the FreeRTOS manual how you might want to use it, like having a I2C thread, message passing interface between threads or mutual exclusion etc..